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

Function make_origin

blame.c:72–81  ·  view source on GitHub ↗

* Given a commit and a path in it, create a new origin structure. * The callers that add blame to the scoreboard should use * get_origin() to obtain shared, refcounted copy instead of calling * this function directly. */

Source from the content-addressed store, hash-verified

70 * this function directly.
71 */
72static struct blame_origin *make_origin(struct commit *commit, const char *path)
73{
74 struct blame_origin *o;
75 FLEX_ALLOC_STR(o, path, path);
76 o->commit = commit;
77 o->refcnt = 1;
78 o->next = get_blame_suspects(commit);
79 set_blame_suspects(commit, o);
80 return o;
81}
82
83/*
84 * Locate an existing origin or create a new one.

Callers 2

get_originFunction · 0.85
fake_working_tree_commitFunction · 0.85

Calls 2

get_blame_suspectsFunction · 0.85
set_blame_suspectsFunction · 0.85

Tested by

no test coverage detected