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/config.txt | 2 ++ Documentation/git-tag.txt | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/config.txt b/Documentation/config.txt index c7d8a01083..d1fab67ca6 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -521,6 +521,8 @@ core.logAllRefUpdates:: file is automatically created for branch heads (i.e. under `refs/heads/`), remote refs (i.e. under `refs/remotes/`), note refs (i.e. under `refs/notes/`), and the symbolic ref `HEAD`. + If it is set to `always`, then a missing reflog is automatically + created for any ref under `refs/`. + This information can be used to determine what commit was the tip of a branch "2 days ago". 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.1