MCPcopy Create free account
hub / github.com/git/git / merge_from_diffs

Function merge_from_diffs

notes-merge.c:526–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526static int merge_from_diffs(struct notes_merge_options *o,
527 const struct object_id *base,
528 const struct object_id *local,
529 const struct object_id *remote,
530 struct notes_tree *t)
531{
532 struct notes_merge_pair *changes;
533 int num_changes, conflicts;
534
535 trace_printf("\tmerge_from_diffs(base = %.7s, local = %.7s, "
536 "remote = %.7s)\n", oid_to_hex(base), oid_to_hex(local),
537 oid_to_hex(remote));
538
539 changes = diff_tree_remote(o, base, remote, &num_changes);
540 diff_tree_local(o, changes, num_changes, base, local);
541
542 conflicts = merge_changes(o, changes, &num_changes, t);
543 free(changes);
544
545 if (o->verbosity >= 4)
546 printf(t->dirty ?
547 "Merge result: %i unmerged notes and a dirty notes tree\n" :
548 "Merge result: %i unmerged notes and a clean notes tree\n",
549 conflicts);
550
551 return conflicts ? -1 : 1;
552}
553
554int notes_merge(struct notes_merge_options *o,
555 struct notes_tree *local_tree,

Callers 1

notes_mergeFunction · 0.85

Calls 4

oid_to_hexFunction · 0.85
diff_tree_remoteFunction · 0.85
diff_tree_localFunction · 0.85
merge_changesFunction · 0.85

Tested by

no test coverage detected