| 1350 | } |
| 1351 | |
| 1352 | int 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 | |
| 1370 | void expand_notes_ref(struct strbuf *sb) |
| 1371 | { |
no test coverage detected