summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorCornelius Weig <cornelius.weig@tngtech.com>2017-01-27 10:09:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-31 18:01:24 (GMT)
commit341fb28621201c5e6c9d3fee5baf7c532fa8a618 (patch)
tree1968a421d74a50dcc53304dd0196af5cf76b8d14 /cache.h
parentd0c93194ecde2886d4e90d7006c998ea9592d0a0 (diff)
downloadgit-341fb28621201c5e6c9d3fee5baf7c532fa8a618.zip
git-341fb28621201c5e6c9d3fee5baf7c532fa8a618.tar.gz
git-341fb28621201c5e6c9d3fee5baf7c532fa8a618.tar.bz2
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 <peff@peff.net> Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 00a029a..96eeaaf 100644
--- a/cache.h
+++ b/cache.h
@@ -660,7 +660,6 @@ extern int minimum_abbrev, default_abbrev;
extern int ignore_case;
extern int assume_unchanged;
extern int prefer_symlink_refs;
-extern int log_all_ref_updates;
extern int warn_ambiguous_refs;
extern int warn_on_object_refname_ambiguity;
extern const char *apply_default_whitespace;
@@ -728,6 +727,14 @@ enum hide_dotfiles_type {
};
extern enum hide_dotfiles_type hide_dotfiles;
+enum log_refs_config {
+ LOG_REFS_UNSET = -1,
+ LOG_REFS_NONE = 0,
+ LOG_REFS_NORMAL,
+ LOG_REFS_ALWAYS
+};
+extern enum log_refs_config log_all_ref_updates;
+
enum branch_track {
BRANCH_TRACK_UNSPECIFIED = -1,
BRANCH_TRACK_NEVER = 0,