threads / patch / 3301

patchgit-commit: Only call git-rerere if $GIT_DIR/rr-cache exists

Subject: [PATCH] git-commit: Only call git-rerere if $GIT_DIR/rr-cache exists

## tl;dr

2 messages between Feb 11, 2006 and Feb 11, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Johannes Schindelin· Feb 11, 2006, 15:03 UTC · lore

This makes an error go away if you do not have Digest.pm installed, but do not intend to make use of git-rerere anyway.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git-commit.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
111b9e1abeb98a8009a457fe8e7dff5a91b30778
Show changes to git-commit.sh +1 −1
diff --git a/git-commit.sh b/git-commit.sh
index 073ec81..28ec7c3 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -638,7 +638,7 @@ else
 fi
 ret="$?"
 rm -f "$GIT_DIR/COMMIT_MSG" "$GIT_DIR/COMMIT_EDITMSG"
-git-rerere
+test -d "$GIT_DIR/rr-cache" && git-rerere
 
 if test -x "$GIT_DIR"/hooks/post-commit && test "$ret" = 0
 then
-- 
1.1.4.gaef2-dirty
Junio C Hamano· Feb 11, 2006, 21:16 UTC · re: Johannes Schindelin · lore

Re: [PATCH] git-commit: Only call git-rerere if $GIT_DIR/rr-cache exists

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> This makes an error go away if you do not have Digest.pm installed, but
> do not intend to make use of git-rerere anyway.

Ah, I did not realize that dependency. Thanks. I think there is at least one more place it does it.

← back to recent threads