git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
René Scharfe <l.s.r@web.de>
Date
Jul 8, 2014, 16:23 UTC
Message-ID
<53BC1B09.1020801@web.de>
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
Message 1 of 1 in “line-log: use commit_list_append() instead of duplicating its code”
  1. line-log: use commit_list_append() instead of duplicating its codeRené Scharfe, Jul 8, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.