Enable "git rerere" by the config variable rerere.enabled

Earlier, "git rerere" was enabled by creating the directory
.git/rr-cache.  That is definitely not in line with most other
features, which are enabled by a config variable.

So, check the config variable "rerere.enabled". If it is set
to "false" explicitely, do not activate rerere, even if
.git/rr-cache exists. This should help when you want to disable
rerere temporarily.

If "rerere.enabled" is not set at all, fall back to detection
of the directory .git/rr-cache.

[jc: with minimum tweaks]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Schindelin
2007-07-06 13:05:59 +01:00
committed by Junio C Hamano
parent b2493649fe
commit b4372ef136
9 changed files with 64 additions and 40 deletions

View File

@ -101,7 +101,7 @@ call_merge () {
return
;;
1)
test -d "$GIT_DIR/rr-cache" && git rerere
git rerere
die "$RESOLVEMSG"
;;
2)
@ -160,10 +160,7 @@ do
--skip)
if test -d "$dotest"
then
if test -d "$GIT_DIR/rr-cache"
then
git rerere clear
fi
git rerere clear
prev_head="`cat $dotest/prev_head`"
end="`cat $dotest/end`"
msgnum="`cat $dotest/msgnum`"
@ -181,10 +178,7 @@ do
exit
;;
--abort)
if test -d "$GIT_DIR/rr-cache"
then
git rerere clear
fi
git rerere clear
if test -d "$dotest"
then
rm -r "$dotest"