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

Function initialise_treesame

revision.c:855–862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853};
854
855static struct treesame_state *initialise_treesame(struct rev_info *revs, struct commit *commit)
856{
857 unsigned n = commit_list_count(commit->parents);
858 struct treesame_state *st = xcalloc(1, st_add(sizeof(*st), n));
859 st->nparents = n;
860 add_decoration(&revs->treesame, &commit->object, st);
861 return st;
862}
863
864/*
865 * Must be called immediately after removing the nth_parent from a commit's

Callers 1

try_to_simplify_commitFunction · 0.85

Calls 4

commit_list_countFunction · 0.85
xcallocFunction · 0.85
st_addFunction · 0.85
add_decorationFunction · 0.85

Tested by

no test coverage detected