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

Function shift_tree_object

merge-ort.c:4984–4999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4982/*** Function Grouping: helper functions for merge_incore_*() ***/
4983
4984static struct tree *shift_tree_object(struct repository *repo,
4985 struct tree *one, struct tree *two,
4986 const char *subtree_shift)
4987{
4988 struct object_id shifted;
4989
4990 if (!*subtree_shift) {
4991 shift_tree(repo, &one->object.oid, &two->object.oid, &shifted, 0);
4992 } else {
4993 shift_tree_by(repo, &one->object.oid, &two->object.oid, &shifted,
4994 subtree_shift);
4995 }
4996 if (oideq(&two->object.oid, &shifted))
4997 return two;
4998 return lookup_tree(repo, &shifted);
4999}
5000
5001static inline void set_commit_tree(struct commit *c, struct tree *t)
5002{

Callers 1

Calls 4

shift_treeFunction · 0.85
shift_tree_byFunction · 0.85
oideqFunction · 0.85
lookup_treeFunction · 0.85

Tested by

no test coverage detected