* 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); *
| 1913 | * return list; |
| 1914 | */ |
| 1915 | struct 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 | |
| 1925 | const char *find_commit_header(const char *msg, const char *key, size_t *out_len) |
| 1926 | { |
no test coverage detected