summaryrefslogtreecommitdiffstats
path: root/notes.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-12 13:30:26 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-12 19:15:44 +0200
commit1e7e4a111f986088abc9194d55349419e5c110c3 (patch)
tree997f95b3783707241bf2a11ee4f9b72f1c6cb261 /notes.h
parentenvironment: stop storing "core.warnAmbiguousRefs" globally (diff)
downloadgit-1e7e4a111f986088abc9194d55349419e5c110c3.tar.xz
git-1e7e4a111f986088abc9194d55349419e5c110c3.zip
environment: stop storing "core.notesRef" globally
Stop storing the "core.notesRef" config value globally. Instead, retrieve the value in `default_notes_ref()`. The code is never called in a hot loop anyway, so doing this on every invocation should be perfectly fine. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes.h')
-rw-r--r--notes.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/notes.h b/notes.h
index 235216944b..6dc6d7b265 100644
--- a/notes.h
+++ b/notes.h
@@ -4,6 +4,7 @@
#include "string-list.h"
struct object_id;
+struct repository;
struct strbuf;
/*
@@ -70,7 +71,7 @@ extern struct notes_tree {
* 3. The value of the core.notesRef config variable, if set
* 4. GIT_NOTES_DEFAULT_REF (i.e. "refs/notes/commits")
*/
-const char *default_notes_ref(void);
+char *default_notes_ref(struct repository *repo);
/*
* Flags controlling behaviour of notes tree initialization