# [RFC/PATCH] enable rerere by default

7 messages from 2007-02-06 to 2007-02-06. Participants: Johannes Schindelin, Alex Riesen, Junio C Hamano.
Thread: https://gitlist.dev/t/6710

## Johannes Schindelin, 2007-02-06 10:13

Subject: [RFC/PATCH] enable rerere by default
Message-ID: <Pine.LNX.4.63.0702061103070.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702061103070.22628%40wbgn013.biozentrum.uni-wuerzburg.de

```

Since the theme of the upcoming release is the (true) Wow factor, we 
should enable this feature by default. New users are not likely to learn 
of that feature otherwise.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---

	I know it is quite late in the game for 1.5.0, but since the theme 
	is usability and user-friendliness, I cannot think of a better 
	release to enable rerere by default, if that should ever happen.

	Comments?

 builtin-init-db.c |    2 ++
 t/t4200-rerere.sh |    3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/builtin-init-db.c b/builtin-init-db.c
index 12e43d0..2504507 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -260,6 +260,8 @@ static int create_default_files(const char *git_dir, const char *template_path)
 		/* allow template config file to override the default */
 		if (log_all_ref_updates == -1)
 		    git_config_set("core.logallrefupdates", "true");
+		strcpy(path + len, "rr-cache");
+		safe_create_dir(path, 1);
 	}
 	return reinit;
 }
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index 91be272..8187038 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -37,9 +37,6 @@ git checkout -b second master
 git show first:a1 | sed 's/To die, t/To die! T/' > a1
 git commit -q -a -m second
 
-# activate rerere
-mkdir .git/rr-cache
-
 test_expect_failure 'conflicting merge' 'git pull . first'
 
 sha1=4f58849a60b4f969a2848966b6d02893b783e8fb

```

## Alex Riesen, 2007-02-06 13:56

Subject: Re: [RFC/PATCH] enable rerere by default
Message-ID: <81b0412b0702060556r3e366defwe4b7afabdf5ffb7c@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0702060556r3e366defwe4b7afabdf5ffb7c%40mail.gmail.com
In-Reply-To: <Pine.LNX.4.63.0702061103070.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
On 2/6/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>
> Since the theme of the upcoming release is the (true) Wow factor, we
> should enable this feature by default. New users are not likely to learn
> of that feature otherwise.
>
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> ---
>
>         I know it is quite late in the game for 1.5.0, but since the theme
>         is usability and user-friendliness, I cannot think of a better
>         release to enable rerere by default, if that should ever happen.
>
>         Comments?

How do I disable rerere by default?

```

## Johannes Schindelin, 2007-02-06 15:03

Subject: Re: [RFC/PATCH] enable rerere by default
Message-ID: <Pine.LNX.4.63.0702061602360.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702061602360.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <81b0412b0702060556r3e366defwe4b7afabdf5ffb7c@mail.gmail.com>

```
Hi,

On Tue, 6 Feb 2007, Alex Riesen wrote:

> On 2/6/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > 
> > Since the theme of the upcoming release is the (true) Wow factor, we
> > should enable this feature by default. New users are not likely to learn
> > of that feature otherwise.
> > 
> > Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> > ---
> > 
> >         I know it is quite late in the game for 1.5.0, but since the theme
> >         is usability and user-friendliness, I cannot think of a better
> >         release to enable rerere by default, if that should ever happen.
> > 
> >         Comments?
> 
> How do I disable rerere by default?

How'd you like it? Should this rather become a config variable, or do you 
want to make a file called "rr-cache" in the templates, which just 
contains a word "disabled"? (git-rerere checks if a _directory_ 
$GIT_DIR/rr-cache exists.)

Ciao,
Dscho

```

## Alex Riesen, 2007-02-06 15:39

Subject: Re: [RFC/PATCH] enable rerere by default
Message-ID: <81b0412b0702060739y35c00332q8945a33743084219@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0702060739y35c00332q8945a33743084219%40mail.gmail.com
In-Reply-To: <Pine.LNX.4.63.0702061602360.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
On 2/6/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > >         I know it is quite late in the game for 1.5.0, but since the theme
> > >         is usability and user-friendliness, I cannot think of a better
> > >         release to enable rerere by default, if that should ever happen.
> > >
> > >         Comments?
> >
> > How do I disable rerere by default?
>
> How'd you like it? Should this rather become a config variable, or do you
> want to make a file called "rr-cache" in the templates, which just
> contains a word "disabled"? (git-rerere checks if a _directory_
> $GIT_DIR/rr-cache exists.)

I suggest a config variable defaulting to "on", able to disable rerere even if
rr-cache exists. So the var has at least theoretical use also after a
repo is created.
I'll put it in templates config then, and modify existing repos to
switch it "off"
(so I always have it mentioned in the configs).
Newbies, who don't have it own templates, wont even notice it.
Unless it is put into the generated config, that is: like
core.logallrefupdates -
it can be in templates config, or git-init writes it.

```

## Johannes Schindelin, 2007-02-06 15:53

Subject: Re: [RFC/PATCH] enable rerere by default
Message-ID: <Pine.LNX.4.63.0702061649520.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702061649520.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <81b0412b0702060739y35c00332q8945a33743084219@mail.gmail.com>

```
Hi,

On Tue, 6 Feb 2007, Alex Riesen wrote:

> On 2/6/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > > > I know it is quite late in the game for 1.5.0, but since the theme 
> > > > is usability and user-friendliness, I cannot think of a better 
> > > > release to enable rerere by default, if that should ever happen.
> > > >
> > > > Comments?
> > >
> > > How do I disable rerere by default?
> > 
> > How'd you like it? Should this rather become a config variable, or do 
> > you want to make a file called "rr-cache" in the templates, which just 
> > contains a word "disabled"? (git-rerere checks if a _directory_ 
> > $GIT_DIR/rr-cache exists.)
> 
> I suggest a config variable defaulting to "on", able to disable rerere 
> even if rr-cache exists.

Okay, but this is a little involved:

$ grep -l rr-cache *.{c,h,sh,perl}
builtin-rerere.c
git-am.sh
git-commit.sh
git-merge.sh
git-rebase.sh
git-reset.sh

So, unless the list agrees that rerere should be enabled by default, I 
will not make a patch to move rerere enabling to the config.

Ciao,
Dscho

```

## Junio C Hamano, 2007-02-06 23:06

Subject: Re: [RFC/PATCH] enable rerere by default
Message-ID: <7vhctyhon2.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vhctyhon2.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.63.0702061602360.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

>> How do I disable rerere by default?
>
> How'd you like it? Should this rather become a config variable, or do you 
> want to make a file called "rr-cache" in the templates, which just 
> contains a word "disabled"? (git-rerere checks if a _directory_ 
> $GIT_DIR/rr-cache exists.)

Is it so bad to do "rm -rf .git/rr-cache"?

```

## Johannes Schindelin, 2007-02-06 23:19

Subject: Re: [RFC/PATCH] enable rerere by default
Message-ID: <Pine.LNX.4.63.0702070016360.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702070016360.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <7vhctyhon2.fsf@assigned-by-dhcp.cox.net>

```
Hi,

On Tue, 6 Feb 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> How do I disable rerere by default?
> >
> > How'd you like it? Should this rather become a config variable, or do you 
> > want to make a file called "rr-cache" in the templates, which just 
> > contains a word "disabled"? (git-rerere checks if a _directory_ 
> > $GIT_DIR/rr-cache exists.)
> 
> Is it so bad to do "rm -rf .git/rr-cache"?

I guess the problem is that you cannot do that by a hook, or by installing 
appropriate templates.

Since the test for rr-cache always is a test for a directory, it might 
make sense to _not_ fail in init-db when creating the directory. In that 
case, rerere can be disabled by installing templates which make rr-cache a 
_file_.

Ciao,
Dscho

```
