git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] line-log: use commit_list_append() instead of duplicating its code
@ 2014-07-08 16:23 René Scharfe
  0 siblings, 0 replies; only message in thread
From: René Scharfe @ 2014-07-08 16:23 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano, Thomas Rast

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 line-log.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/line-log.c b/line-log.c
index 1500101..afcc98d 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);
-- 
2.0.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-08 16:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-08 16:23 [PATCH] line-log: use commit_list_append() instead of duplicating its code René Scharfe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).