Skip to content

Commit 72c7794

Browse files
rscharfegitster
authored andcommitted
line-log: use commit_list_append() instead of duplicating its code
Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4602f1a commit 72c7794

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

line-log.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,9 +1174,7 @@ static int process_ranges_merge_commit(struct rev_info *rev, struct commit *comm
11741174
*/
11751175
add_line_range(rev, parents[i], cand[i]);
11761176
clear_commit_line_range(rev, commit);
1177-
commit->parents = xmalloc(sizeof(struct commit_list));
1178-
commit->parents->item = parents[i];
1179-
commit->parents->next = NULL;
1177+
commit_list_append(parents[i], &commit->parents);
11801178
free(parents);
11811179
free(cand);
11821180
free_diffqueues(nparents, diffqueues);

0 commit comments

Comments
 (0)