diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-02-03 14:15:59 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-03 14:15:59 -0800 |
commit | 1cb3ed308dcfaa6084b8aed075c772aeb9e57243 (patch) | |
tree | 75a9536e7071b4785887ef6c251be09df45d46d9 /notes.c | |
parent | Merge branch 'jc/peace-with-crlf' (diff) | |
parent | notes: allow merging from arbitrary references (diff) | |
download | tgif-1cb3ed308dcfaa6084b8aed075c772aeb9e57243.tar.xz |
Merge branch 'jk/notes-merge-from-anywhere'
"git notes merge" used to limit the source of the merged notes tree
to somewhere under refs/notes/ hierarchy, which was too limiting
when inventing a workflow to exchange notes with remote
repositories using remote-tracking notes trees (located in e.g.
refs/remote-notes/ or somesuch).
* jk/notes-merge-from-anywhere:
notes: allow merging from arbitrary references
Diffstat (limited to 'notes.c')
-rw-r--r-- | notes.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1306,3 +1306,13 @@ void expand_notes_ref(struct strbuf *sb) else strbuf_insert(sb, 0, "refs/notes/", 11); } + +void expand_loose_notes_ref(struct strbuf *sb) +{ + unsigned char object[20]; + + if (get_sha1(sb->buf, object)) { + /* fallback to expand_notes_ref */ + expand_notes_ref(sb); + } +} |