Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
notes.h: Make default_notes_ref() available in notes API
author
Johan Herland
<johan@herland.net>
Tue, 9 Nov 2010 21:49:39 +0000
(22:49 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 10 Nov 2010 18:25:52 +0000
(10:25 -0800)
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
notes.c
patch
|
blob
|
history
notes.h
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
55d0607
)
diff --git
a/notes.c
b/notes.c
index bb03eb03645ad46d1e11e8ef8d5c778c870aa279..d71c0a30bfeee7401b017bf0dc9e00062df05f01 100644
(file)
--- 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;
}
return 0;
}
-
static
const char *default_notes_ref(void)
+const char *default_notes_ref(void)
{
const char *notes_ref = NULL;
if (!notes_ref)
{
const char *notes_ref = NULL;
if (!notes_ref)
diff --git
a/notes.h
b/notes.h
index c0288b0d32d5fd63ba691e4d7f272ddb4ae319da..20db42fe952ed330c831563085236cd3a082e435 100644
(file)
--- a/
notes.h
+++ b/
notes.h
@@
-43,6
+43,20
@@
extern struct notes_tree {
int dirty;
} default_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
*
/*
* Flags controlling behaviour of notes tree initialization
*