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

2 messages from 2006-02-11 to 2006-02-11. Participants: Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/3301

## Johannes Schindelin, 2006-02-11 15:03

Subject: [PATCH] git-commit: Only call git-rerere if $GIT_DIR/rr-cache exists
Message-ID: <Pine.LNX.4.63.0602111602270.26560@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0602111602270.26560%40wbgn013.biozentrum.uni-wuerzburg.de

```

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
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, 2006-02-11 21:16

Subject: Re: [PATCH] git-commit: Only call git-rerere if $GIT_DIR/rr-cache exists
Message-ID: <7vaccxlhol.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vaccxlhol.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.63.0602111602270.26560@wbgn013.biozentrum.uni-wuerzburg.de>

```
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.

```
