Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Documentation: rerere.enabled overrides [ -d rr-cache ]

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:44

Thomas Rast [off-list ref] writes:
git-rerere(1) does not mention the rr-cache fallback; I decided not to
touch it as it's a bit of an implementation detail.
It is not an implementation detail but is a (n old) part of the external
UI. Creating .git/rr-cache directory has been the only way to enable it
for quite a while (ever since it was first written as a Perl script early
2006, and the design even survived the rewrite in C late 2006). When the
configuration variable rerere.enabled was introduced with b4372ef (Enable
"git rerere" by the config variable rerere.enabled, 2007-07-06), we
deliberately kept the external interface compatible to avoid disruption.

And your "By default, ... is enabled if there is ... directory" below is
exactly the right description.

The manual page for "rerere" talks about "configuration variable
rerere.enabled"; perhaps it should also refer to git config manual page to
make it more discoverable?
... OTOH the
auto-creation of rr-cache can cause strange behavior if a user has
rerere.enabled unset and tries it once, as in

  git config rerere.enabled true
  git merge ...
  git config --unset rerere.enabled
That is because the last one should be

	git config --bool rerere.enabled false

Perhaps the description for "--unset" option in the manual of "git config"
is not clear enough that there is a difference between a variable not
being set (i.e. we do not know anything about what the user wants) and a
variable explicitly set to false (i.e. we do know the user does not want
it)?  I doubt it, but you may want to check and clarify the section if
needed.

The patch itself looks good; it goes in the right direction.

Thanks.
quoted hunk
 Documentation/config.txt |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 68cf702..04f5e19 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1783,10 +1783,10 @@ rerere.autoupdate::
 
 rerere.enabled::
 	Activate recording of resolved conflicts, so that identical
-	conflict hunks can be resolved automatically, should they
-	be encountered again.  linkgit:git-rerere[1] command is by
-	default enabled if you create `rr-cache` directory under
-	`$GIT_DIR`, but can be disabled by setting this option to false.
+	conflict hunks can be resolved automatically, should they be
+	encountered again.  By default, linkgit:git-rerere[1] is
+	enabled if there is an `rr-cache` directory under the
+	`$GIT_DIR`.
 
 sendemail.identity::
 	A configuration identity. When given, causes values in the
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help