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

Function commit_list_append

commit.c:1915–1923  ·  view source on GitHub ↗

* Append a commit to the end of the commit_list. * * next starts by pointing to the variable that holds the head of an * empty commit_list, and is updated to point to the "next" field of * the last item on the list as new commits are appended. * * Usage example: * * struct commit_list *list; * struct commit_list **next = &list; * * next = commit_list_append(c1, next); *

Source from the content-addressed store, hash-verified

1913 * return list;
1914 */
1915struct commit_list **commit_list_append(struct commit *commit,
1916 struct commit_list **next)
1917{
1918 struct commit_list *new_commit = xmalloc(sizeof(struct commit_list));
1919 new_commit->item = commit;
1920 *next = new_commit;
1921 new_commit->next = NULL;
1922 return &new_commit->next;
1923}
1924
1925const char *find_commit_header(const char *msg, const char *key, size_t *out_len)
1926{

Callers 13

paint_down_to_commonFunction · 0.85
merge_bases_manyFunction · 0.85
get_merge_bases_many_0Function · 0.85
repo_in_merge_basesFunction · 0.85
prepare_revision_walkFunction · 0.85
commit_list_copyFunction · 0.85
select_pseudo_merges_1Function · 0.85
collect_stash_entriesFunction · 0.85
do_export_stashFunction · 0.85
merge_trivialFunction · 0.85
cmd_commitFunction · 0.85

Calls 1

xmallocFunction · 0.70

Tested by

no test coverage detected