MCPcopy Index your code
hub / github.com/git/git / copy_note

Function copy_note

notes.c:1352–1368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1350}
1351
1352int copy_note(struct notes_tree *t,
1353 const struct object_id *from_obj, const struct object_id *to_obj,
1354 int force, combine_notes_fn combine_notes)
1355{
1356 const struct object_id *note = get_note(t, from_obj);
1357 const struct object_id *existing_note = get_note(t, to_obj);
1358
1359 if (!force && existing_note)
1360 return 1;
1361
1362 if (note)
1363 return add_note(t, to_obj, note, combine_notes);
1364 else if (existing_note)
1365 return add_note(t, to_obj, null_oid(the_hash_algo), combine_notes);
1366
1367 return 0;
1368}
1369
1370void expand_notes_ref(struct strbuf *sb)
1371{

Callers 2

copy_note_for_rewriteFunction · 0.85
notes_copy_from_stdinFunction · 0.85

Calls 3

get_noteFunction · 0.85
add_noteFunction · 0.85
null_oidFunction · 0.85

Tested by

no test coverage detected