Re: [PATCH] Enable "git rerere" by the config variable rerere.enabled
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jul 8, 2007, 21:36 UTC
- Message-ID
- <20070708213639.GB4436@spearce.org>
- In-Reply-To
- <Pine.LNX.4.64.0707061303450.4093@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 8 quoted lines
> 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.
...
Show 15 quoted lines
> diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl
> index f9791f6..578bef8 100644
> --- a/git-gui/lib/commit.tcl
> +++ b/git-gui/lib/commit.tcl
> @@ -331,9 +331,7 @@ A rescan will be automatically started now.
>
> # -- Let rerere do its thing.
> #
> - if {[file isdirectory [gitdir rr-cache]]} {
> - catch {git rerere}
> - }
> + catch {git rerere}
>
> # -- Run the post-commit hook.
> #While I applaud the idea of someone else doing the dirty work for me, the patch above to git-gui always runs rerere, even if the user has disabled it with rerere.enabled=false. Not very nice to do.
The master branch of git-gui will (very soon) have a change that actually honors rerere.enabled, as described in the commit message of git.git's b4372ef136b0a5a2c1dbd88a11dd72b478d0e0a5, aka the text I quoted above.
-- Shawn.