From: Johan Herland Date: Tue, 9 Nov 2010 21:49:39 +0000 (+0100) Subject: notes.h: Make default_notes_ref() available in notes API X-Git-Tag: v1.7.4-rc0~82^2~20 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4a9cf1cefc0fd05e0eb46f862e398f1e4ac1c9a7;p=git.git notes.h: Make default_notes_ref() available in notes API Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- diff --git a/notes.c b/notes.c index bb03eb036..d71c0a30b 100644 --- a/notes.c +++ b/notes.c @@ -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) diff --git a/notes.h b/notes.h index c0288b0d3..20db42fe9 100644 --- a/notes.h +++ b/notes.h @@ -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 *