From 341fb28621201c5e6c9d3fee5baf7c532fa8a618 Mon Sep 17 00:00:00 2001 From: Cornelius Weig Date: Fri, 27 Jan 2017 11:09:47 +0100 Subject: refs: add option core.logAllRefUpdates = always When core.logallrefupdates is true, we only create a new reflog for refs that are under certain well-known hierarchies. The reason is that we know that some hierarchies (like refs/tags) are not meant to change, and that unknown hierarchies might not want reflogs at all (e.g., a hypothetical refs/foo might be meant to change often and drop old history immediately). However, sometimes it is useful to override this decision and simply log for all refs, because the safety and audit trail is more important than the performance implications of keeping the log around. This patch introduces a new "always" mode for the core.logallrefupdates option which will log updates to everything under refs/, regardless where in the hierarchy it is (we still will not log things like ORIG_HEAD and FETCH_HEAD, which are known to be transient). Based-on-patch-by: Jeff King Signed-off-by: Cornelius Weig Reviewed-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-tag.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation/git-tag.txt') diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 5055a96823..2ac25a9bb3 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -150,7 +150,8 @@ This option is only applicable when listing tags without annotation lines. 'strip' removes both whitespace and commentary. --create-reflog:: - Create a reflog for the tag. + Create a reflog for the tag. To globally enable reflogs for tags, see + `core.logAllRefUpdates` in linkgit:git-config[1]. :: The name of the tag to create, delete, or describe. -- cgit v1.2.3 From 67c70bd930538890d8eccace72fb0e0a0e565447 Mon Sep 17 00:00:00 2001 From: Cornelius Weig Date: Wed, 1 Feb 2017 23:07:27 +0100 Subject: doc: add note about ignoring '--no-create-reflog' The commands git-branch and git-tag accept the '--create-reflog' option, and create reflog even when core.logallrefupdates configuration is explicitly set not to. On the other hand, the negated form '--no-create-reflog' is accepted as a valid option but has no effect (other than overriding an earlier '--create-reflog' on the command line). This silent noop may puzzle users. To communicate that this is a known limitation, add a short note in the manuals for git-branch and git-tag. Signed-off-by: Cornelius Weig Helped-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-tag.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation/git-tag.txt') diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 2ac25a9bb3..1d2e9a05f6 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -152,6 +152,9 @@ This option is only applicable when listing tags without annotation lines. --create-reflog:: Create a reflog for the tag. To globally enable reflogs for tags, see `core.logAllRefUpdates` in linkgit:git-config[1]. + The negated form `--no-create-reflog` only overrides an earlier + `--create-reflog`, but currently does not negate the setting of + `core.logallrefupdates`. :: The name of the tag to create, delete, or describe. -- cgit v1.2.3