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

[PATCH 4/7] Relaxes error checking in epoch.c to allow duplicate parents

From
Jon Seymour <jon.seymour@gmail.com>
Date
Jun 20, 2005, 02:29 UTC
Message-ID
<20050620022933.28599.qmail@blackcubes.dyndns.org>

Given that real trees in the wild include parents with duplicate parents, I have relaxed over-zealous error checking in epoch.c and dealt with the problem a different way - duplicate parents are now silently ignored.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
 epoch.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/epoch.c b/epoch.c
--- a/epoch.c
+++ b/epoch.c
@@ -224,17 +224,13 @@ static int find_base_for_list(struct com
 	for (; list; list = list->next) {
 		struct commit *item = list->item;
 
-		if (item->object.util) {
-			die("%s:%d:%s: logic error: this should not have happened - commit %s",
-			    __FILE__, __LINE__, __FUNCTION__,
-			    sha1_to_hex(item->object.sha1));
-		}
-
-		new_mass_counter(list->item, get_one());
-		add(&injected, &injected, get_one());
+		if (!item->object.util) {
+			new_mass_counter(list->item, get_one());
+			add(&injected, &injected, get_one());
 
-		commit_list_insert(list->item, &cleaner);
-		commit_list_insert(list->item, &pending);
+			commit_list_insert(list->item, &cleaner);
+			commit_list_insert(list->item, &pending);
+		}
 	}
 
 	while (!*boundary && pending && !ret) {
------------
Message 1 of 1 in “Relaxes error checking in epoch.c to allow duplicate parents”
  1. 4/7 Relaxes error checking in epoch.c to allow duplicate parentsJon Seymour, Jun 20, 2005

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.