diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-09-12 13:30:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-09-12 10:15:43 -0700 |
commit | 9a20b889e8703482162d9d1487b876be42564a78 (patch) | |
tree | 04e8121ac4dbbb63b03559b6b8485ae285065f73 /commit.c | |
parent | 118fd1a26da681d33dfc65e9dbf74e2dda0c5b3e (diff) |
refs: stop modifying global `log_all_ref_updates` variable
In refs-related code we modify the global `log_all_ref_updates`
variable, which is done because `should_autocreate_reflog()` does not
accept passing an `enum log_refs_config` but instead accesses the global
variable. Adapt its interface such that the value is provided by the
caller, which allows us to compute the proper value locally without
having to modify global state.
This change requires us to move the enum to "repo-settings.h", or
otherwise we get compilation errors due to include cycles. We're about
to fully move this setting into the repo-settings subsystem anyway, so
this is fine.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions