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
This commit is contained in:
10
notes.c
10
notes.c
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user