Git development
 help / color / mirror / Atom feed
From: Jon Seymour <jon.seymour@gmail.com>
To: git@vger.kernel.org
Cc: torvalds@osdl.org, jon.seymour@gmail.com, paulus@samba.org
Subject: [PATCH 4/7] Relaxes error checking in epoch.c to allow duplicate parents
Date: Mon, 20 Jun 2005 12:29:33 +1000	[thread overview]
Message-ID: <20050620022933.28599.qmail@blackcubes.dyndns.org> (raw)


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) {
------------

                 reply	other threads:[~2005-06-20  2:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050620022933.28599.qmail@blackcubes.dyndns.org \
    --to=jon.seymour@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox