@matheusbsbs / matheus-bagliano / commits / 8e4a91bd78
Fork 0

rebase -i: remember the settings of -v, -s and -p when interrupted

After interruption, be that an edit, or a conflicting commit, reset the variables VERBOSE, STRATEGY and PRESERVE_MERGES, so that the user does not have to respecify them with "rebase --continue". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jul 8, 2007 at 03:02 UTC 8e4a91bd780b89c7337f281a8601f2e0cae108fc
2 files changed +14
git-rebase--interactive.sh
+4
@@ -23,6 +23,9 @@ REWRITTEN="$DOTEST"/rewritten
23 PRESERVE_MERGES=
24 STRATEGY=
25 VERBOSE=
26 +test -d "$REWRITTEN" && PRESERVE_MERGES=t
27 +test -f "$DOTEST"/strategy && STRATEGY="$(cat "$DOTEST"/strategy)"
28 +test -f "$DOTEST"/verbose && VERBOSE=t
29
30 warn () {
31 echo "$*" >&2
@@ -366,6 +369,7 @@ do
369 echo $HEAD > "$DOTEST"/head
370 echo $UPSTREAM > "$DOTEST"/upstream
371 echo $ONTO > "$DOTEST"/onto
372 + test -z "$STRATEGY" || echo "$STRATEGY" > "$DOTEST"/strategy
373 test t = "$VERBOSE" && : > "$DOTEST"/verbose
374 if [ t = "$PRESERVE_MERGES" ]
375 then
t/t3404-rebase-interactive.sh
+10
@@ -202,4 +202,14 @@ test_expect_success '--continue tries to commit' '
202 git show HEAD | grep chouette
203 '
204
205 +test_expect_success 'verbose flag is heeded, even after --continue' '
206 + git reset --hard HEAD@{1} &&
207 + test_tick &&
208 + ! git rebase -v -i --onto new-branch1 HEAD^ &&
209 + echo resolved > file1 &&
210 + git add file1 &&
211 + git rebase --continue > output &&
212 + grep "^ file1 | 2 +-$" output
213 +'
214 +
215 test_done