aboutsummaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-07-08 03:02:47 +0100
committerJunio C Hamano <gitster@pobox.com>2007-07-08 18:24:19 -0700
commit8e4a91bd780b89c7337f281a8601f2e0cae108fc (patch)
treec089102c6f0fdaa175ca0a78629aa937f584fdda /git-rebase--interactive.sh
parent3df0a859aa5cc68a2bd616cb686f01cf0e2468c1 (diff)
downloadgit-8e4a91bd780b89c7337f281a8601f2e0cae108fc.tar.gz
git-8e4a91bd780b89c7337f281a8601f2e0cae108fc.tar.xz
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>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 1a064af38..ac4d559f0 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -23,6 +23,9 @@ REWRITTEN="$DOTEST"/rewritten
PRESERVE_MERGES=
STRATEGY=
VERBOSE=
+test -d "$REWRITTEN" && PRESERVE_MERGES=t
+test -f "$DOTEST"/strategy && STRATEGY="$(cat "$DOTEST"/strategy)"
+test -f "$DOTEST"/verbose && VERBOSE=t
warn () {
echo "$*" >&2
@@ -366,6 +369,7 @@ do
echo $HEAD > "$DOTEST"/head
echo $UPSTREAM > "$DOTEST"/upstream
echo $ONTO > "$DOTEST"/onto
+ test -z "$STRATEGY" || echo "$STRATEGY" > "$DOTEST"/strategy
test t = "$VERBOSE" && : > "$DOTEST"/verbose
if [ t = "$PRESERVE_MERGES" ]
then