@matheusbsbs / matheus-bagliano / commits / 1536dd9c61
Fork 0

Only call git-rerere if $GIT_DIR/rr-cache exists.

Johannes noticed that git-rerere depends on Digest.pm, and if one does not use the command, one can live without it. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Feb 11, 2006 at 18:55 UTC 1536dd9c61b5582cf079999057cb715dd6dc6620
3 files changed +12 -3
git-am.sh
+4 -1
@@ -88,7 +88,10 @@ fall_back_3way () {
88 # saying that we reverted all those changes.
89
90 git-merge-resolve $orig_tree -- HEAD $his_tree || {
91 - git-rerere
91 + if test -d "$GIT_DIR/rr-cache"
92 + then
93 + git-rerere
94 + fi
95 echo Failed to merge in the changes.
96 exit 1
97 }
git-commit.sh
+4 -1
@@ -638,7 +638,10 @@ else
638 fi
639 ret="$?"
640 rm -f "$GIT_DIR/COMMIT_MSG" "$GIT_DIR/COMMIT_EDITMSG"
641 -git-rerere
641 +if test -d "$GIT_DIR/rr-cache"
642 +then
643 + git-rerere
644 +fi
645
646 if test -x "$GIT_DIR"/hooks/post-commit && test "$ret" = 0
647 then
git-merge.sh
+4 -1
@@ -309,6 +309,9 @@ Conflicts:
309 sed -e 's/^[^ ]* / /' |
310 uniq
311 } >>"$GIT_DIR/MERGE_MSG"
312 - git rerere
312 + if test -d "$GIT_DIR/rr-cache"
313 + then
314 + git-rerere
315 + fi
316 die "Automatic merge failed; fix up by hand"
317 fi