summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <Johannes.Schindelin@gmx.de>2007-11-22 11:18:10 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-11-28 17:57:28 -0800
commitecfe72ff658124ea301ec7b2bb8b987689303685 (patch)
tree92f78efb07ae30cd69df39041a785fd812c49383
parentMerge branch 'maint' (diff)
downloadtgif-ecfe72ff658124ea301ec7b2bb8b987689303685.tar.xz
rebase -i: give rerere a chance
Like non-interactive rebase, interactive mode now calls rerere when appropriate. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-rebase--interactive.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index e9cd6fd999..354510a3ba 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -90,6 +90,7 @@ make_patch () {
die_with_patch () {
make_patch "$1"
+ git rerere
die "$2"
}
@@ -175,13 +176,13 @@ pick_one_preserving_merges () {
msg="$(git cat-file commit $sha1 | sed -e '1,/^$/d')"
# No point in merging the first parent, that's HEAD
new_parents=${new_parents# $first_parent}
- # NEEDSWORK: give rerere a chance
if ! GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \
output git merge $STRATEGY -m "$msg" \
$new_parents
then
+ git rerere
printf "%s\n" "$msg" > "$GIT_DIR"/MERGE_MSG
die Error redoing merge $sha1
fi
@@ -369,6 +370,7 @@ do
--abort)
comment_for_reflog abort
+ git rerere clear
test -d "$DOTEST" || die "No interactive rebase running"
HEADNAME=$(cat "$DOTEST"/head-name)
@@ -385,6 +387,7 @@ do
--skip)
comment_for_reflog skip
+ git rerere clear
test -d "$DOTEST" || die "No interactive rebase running"
output git reset --hard && do_rest