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

Function ll_diff_tree_paths

tree-diff.c:430–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430static void ll_diff_tree_paths(
431 struct combine_diff_path ***tail, const struct object_id *oid,
432 const struct object_id **parents_oid, int nparent,
433 struct strbuf *base, struct diff_options *opt,
434 int depth)
435{
436 struct tree_desc t, *tp;
437 void *ttree, **tptree;
438 int i;
439
440 if (depth > opt->repo->settings.max_allowed_tree_depth)
441 die("exceeded maximum allowed tree depth");
442
443 FAST_ARRAY_ALLOC(tp, nparent);
444 FAST_ARRAY_ALLOC(tptree, nparent);
445
446 /*
447 * load parents first, as they are probably already cached.
448 *
449 * ( log_tree_diff() parses commit->parent before calling here via
450 * diff_tree_oid(parent, commit) )
451 */
452 for (i = 0; i < nparent; ++i)
453 tptree[i] = fill_tree_descriptor(opt->repo, &tp[i], parents_oid[i]);
454 ttree = fill_tree_descriptor(opt->repo, &t, oid);
455
456 /* Enable recursion indefinitely */
457 opt->pathspec.recursive = opt->flags.recursive;
458
459 for (;;) {
460 int imin, cmp;
461
462 if (diff_can_quit_early(opt))
463 break;
464
465 if (opt->max_changes && diff_queued_diff.nr > opt->max_changes)
466 break;
467
468 if (opt->pathspec.nr) {
469 skip_uninteresting(&t, base, opt);
470 for (i = 0; i < nparent; i++)
471 skip_uninteresting(&tp[i], base, opt);
472 }
473
474 /* comparing is finished when all trees are done */
475 if (!t.size) {
476 int done = 1;
477 for (i = 0; i < nparent; ++i)
478 if (tp[i].size) {
479 done = 0;
480 break;
481 }
482 if (done)
483 break;
484 }
485
486 /*
487 * lookup imin = argmin(p1...pn),

Callers 2

emit_pathFunction · 0.85
diff_tree_pathsFunction · 0.85

Calls 9

fill_tree_descriptorFunction · 0.85
diff_can_quit_earlyFunction · 0.85
skip_uninterestingFunction · 0.85
tree_entry_pathcmpFunction · 0.85
oideqFunction · 0.85
emit_pathFunction · 0.85
update_tree_entryFunction · 0.85
update_tp_entriesFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected