Skip to contentSkip to conversation

line-log: use commit_list_append() instead of duplicating its code

PATCH New René Scharfe 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 line-log: use commit_list_append() instead of duplicating its code

---
 line-log.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
line-log.c +1 -3
index 1500101..afcc98d 100644
@@ -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);
Signature · 1 line
2.0.0