summaryrefslogtreecommitdiff
path: root/line-log.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-07-08 18:23:37 +0200
committerJunio C Hamano <gitster@pobox.com>2014-07-08 11:01:53 -0700
commit72c779457cd72928e36f2bc43c3ff7f3ae7b77c3 (patch)
treea29849169b1a2aa2048aa75cd015cc5005e320af /line-log.c
parent4602f1a4346c881289011810c5f76886ca0e2d0c (diff)
downloadgit-72c779457cd72928e36f2bc43c3ff7f3ae7b77c3.tar.gz
line-log: use commit_list_append() instead of duplicating its code
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'line-log.c')
-rw-r--r--line-log.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/line-log.c b/line-log.c
index 1500101058..afcc98db93 100644
--- a/line-log.c
+++ b/line-log.c
@@ -1174,9 +1174,7 @@ static int process_ranges_merge_commit(struct rev_info *rev, struct commit *comm
*/
add_line_range(rev, parents[i], cand[i]);
clear_commit_line_range(rev, commit);
- commit->parents = xmalloc(sizeof(struct commit_list));
- commit->parents->item = parents[i];
- commit->parents->next = NULL;
+ commit_list_append(parents[i], &commit->parents);
free(parents);
free(cand);
free_diffqueues(nparents, diffqueues);