Skip to content

Commit

Permalink
notes.h: Make default_notes_ref() available in notes API
Browse files Browse the repository at this point in the history
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johan Herland authored and Junio C Hamano committed Nov 10, 2010
1 parent 55d0607 commit 4a9cf1c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion notes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 14 additions & 0 deletions notes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit 4a9cf1c

Please sign in to comment.