--- oslo-series-final/0026-guilt-pop-now-fails-when-there-are-no-more-patches-t.patch +++ oslo-series-v2/v2-0026-guilt-pop-now-fails-when-there-are-no-more-patche.patch @@ -1,8 +1,8 @@ -From 0b89f614bce24a9a87ff97c6d032ea90a4b3762e Mon Sep 17 00:00:00 2001 +From c4d65a08d9665242a85844d659db24f27e1c71b3 Mon Sep 17 00:00:00 2001 From: Per Cederqvist -Date: Wed, 19 Mar 2014 21:53:09 +0100 -Subject: [GUILT 26/28] "guilt pop" now fails when there are no more patches to - pop. +Date: Tue, 13 May 2014 21:40:20 +0200 +Subject: [GUILT v2 26/29] "guilt pop" now fails when there are no more patches + to pop. To: Jeff Sipek Cc: git@vger.kernel.org @@ -14,9 +14,9 @@ Signed-off-by: Per Cederqvist --- - guilt-pop | 13 +++++++------ + guilt-pop | 17 +++++++++++------ regression/t-021.out | 2 ++ regression/t-021.sh | 6 ++++++ - regression/t-061.sh | 7 ++++++- - 4 files changed, 21 insertions(+), 7 deletions(-) + regression/t-061.sh | 6 +++++- + 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/guilt-pop b/guilt-pop index f0e647f..208f868 100755 --- a/guilt-pop +++ b/guilt-pop - @@ -48,10 +48,16 @@ fi - + @@ -49,9 +49,19 @@ fi patch="$1" [ ! -z "$all" ] && patch="-a" - +[ -z "$patch" ] && { patch=1; num=t; } + +# Treat "guilt pop" as "guilt pop -n 1". + +if [ -z "$patch" ]; then + + patch=1 + + num=t + +fi + + if [ ! -s "$applied" ]; then disp "No patches applied." - exit 0 - + if [ "$patch" = "-a" ] - + then + + if [ "$patch" = "-a" ]; then + exit 0 + else + exit 1 [...] elif [ "$patch" = "-a" ]; then # we are supposed to pop all patches diff --git a/regression/t-061.sh b/regression/t-061.sh index 1411baa..a9a4fea 100755 --- a/regression/t-061.sh +++ b/regression/t-061.sh - @@ -48,7 +48,12 @@ cmd list_files + @@ -48,7 +48,11 @@ cmd list_files for i in `seq 5` do - cmd guilt pop - + if [ $i -ge 5 ] - + then + + if [ $i -ge 5 ]; then + shouldfail guilt pop + else + cmd guilt pop [...] cmd guilt push cmd git for-each-ref --