aboutsummaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2016-05-27 18:28:21 +0200
committerJunio C Hamano <gitster@pobox.com>2016-05-31 13:47:18 -0700
commit7063693d51778815cfb9a4bc1e4e6d16f13589e7 (patch)
tree7bbe948157ab7e25a699ce0a716e5b41a3e52a94 /git-rebase--interactive.sh
parent765428699a5381f113d19974720bc91b5bfeaf1d (diff)
downloadgit-7063693d51778815cfb9a4bc1e4e6d16f13589e7.tar.gz
git-7063693d51778815cfb9a4bc1e4e6d16f13589e7.tar.xz
rebase -i: remove an unnecessary 'rerere' invocation
Interactive rebase uses 'git cherry-pick' and 'git merge' to replay commits. Both invoke the 'rerere' machinery when they fail due to merge conflicts. Note that all code paths with these two commands also invoke the shell function die_with_patch when the commands fail. Since commit 629716d2 ("rerere: do use multiple variants") the second operation of the rerere machinery can be observed by a duplicated message "Recorded preimage for 'file'". This second operation records the same preimage as the first one and, hence, only wastes cycles. Remove the 'git rerere' invocation from die_with_patch. Shell function die_with_patch can be called after the failure of "git commit", too, which also calls into the rerere machinery, but it does so only after a successful commit to record the resolution. Therefore, it is wrong to call 'git rerere' from die_with_patch after "git commit" fails. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh1
1 files changed, 0 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 0564ad41f..453275f0d 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -181,7 +181,6 @@ make_patch () {
die_with_patch () {
echo "$1" > "$state_dir"/stopped-sha
make_patch "$1"
- git rerere
die "$2"
}