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

Function get_merge_parent

commit.c:1883–1896  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1881}
1882
1883struct commit *get_merge_parent(const char *name)
1884{
1885 struct object *obj;
1886 struct commit *commit;
1887 struct object_id oid;
1888 if (repo_get_oid(the_repository, name, &oid))
1889 return NULL;
1890 obj = parse_object(the_repository, &oid);
1891 commit = (struct commit *)repo_peel_to_type(the_repository, name, 0,
1892 obj, OBJ_COMMIT);
1893 if (commit && !merge_remote_util(commit))
1894 set_merge_remote_desc(commit, name, obj);
1895 return commit;
1896}
1897
1898/*
1899 * Append a commit to the end of the commit_list.

Callers 5

merge_nameFunction · 0.85
handle_fetch_headFunction · 0.85
collect_parentsFunction · 0.85
cmd_commitFunction · 0.85
real_mergeFunction · 0.85

Calls 5

repo_get_oidFunction · 0.85
parse_objectFunction · 0.85
repo_peel_to_typeFunction · 0.85
merge_remote_utilFunction · 0.85
set_merge_remote_descFunction · 0.85

Tested by

no test coverage detected