Commit 4a9cf1ce authored by Johan Herland's avatar Johan Herland Committed by Junio C Hamano

notes.h: Make default_notes_ref() available in notes API

Signed-off-by: default avatarJohan Herland <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 55d06077
......@@ -898,7 +898,7 @@ static int notes_display_config(const char *k, const char *v, void *cb)
return 0;
static const char *default_notes_ref(void)
const char *default_notes_ref(void)
const char *notes_ref = NULL;
if (!notes_ref)
......@@ -43,6 +43,20 @@ extern struct notes_tree {
int dirty;
} default_notes_tree;
* Return the default notes ref.
* The default notes ref is the notes ref that is used when notes_ref == NULL
* is passed to init_notes().
* This the first of the following to be defined:
* 1. The '--ref' option to 'git notes', if given
* 2. The $GIT_NOTES_REF environment variable, if set
* 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);
* Flags controlling behaviour of notes tree initialization
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment