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>
This commit is contained in:
committed by
Junio C Hamano
parent
11dbb4ace3
commit
1e7e4a111f
3
notes.h
3
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
|
||||
|
||||
Reference in New Issue
Block a user