Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/2] format-patch: use clear_commit_marks() instead of some adhocery
Date: Mon, 26 Jun 2006 09:09:15 -0700	[thread overview]
Message-ID: <7vhd27j3v8.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0606261728340.29667@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Mon, 26 Jun 2006 17:33:40 +0200 (CEST)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> 	It is not clean to reset the flags of all objects to 0. Instead, 
> 	the commits are walked directly. Not that it matters in that
> 	particular case (the only read objects _are_ these commits).

I think this makes sense, but the clear-commit-marks function
itself looks fishy.  I suspect a parent that has not been parsed
could be already marked in which case the current code would
leave it marked.  Don't we need this perhaps?

diff --git a/commit.c b/commit.c
index 946615d..69fbc41 100644
--- a/commit.c
+++ b/commit.c
@@ -397,8 +397,7 @@ void clear_commit_marks(struct commit *c
 	commit->object.flags &= ~mark;
 	while (parents) {
 		struct commit *parent = parents->item;
-		if (parent && parent->object.parsed &&
-		    (parent->object.flags & mark))
+		if (parent && (parent->object.flags & mark))
 			clear_commit_marks(parent, mark);
 		parents = parents->next;
 	}

  reply	other threads:[~2006-06-26 16:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-25  1:50 [PATCH 0/2] resurrect format-patch's patch id checking Johannes Schindelin
2006-06-26 15:33 ` [PATCH 3/2] format-patch: use clear_commit_marks() instead of some adhocery Johannes Schindelin
2006-06-26 16:09   ` Junio C Hamano [this message]
2006-06-26 22:44     ` Johannes Schindelin
2006-06-26 22:20   ` Martin Langhoff
2006-06-26 22:39     ` Johannes Schindelin
2006-06-26 22:50       ` Martin Langhoff
2006-06-26 23:00         ` Johannes Schindelin
2006-06-26 23:04           ` Junio C Hamano
2006-06-26 23:14             ` [PATCH] format-patch: support really old non-range syntax, with a warning Johannes Schindelin
2006-06-26 23:15           ` [PATCH 3/2] format-patch: use clear_commit_marks() instead of some adhocery Martin Langhoff (CatalystIT)
2006-06-26 23:21             ` Johannes Schindelin
2006-06-27  8:31             ` Johannes Schindelin
2006-06-27  9:52               ` Martin Langhoff
2006-06-27 10:54                 ` Johannes Schindelin
2006-06-27 11:09                   ` Martin Langhoff
2006-06-27 12:39                     ` Johannes Schindelin
2006-06-26 22:48     ` Junio C Hamano
2006-06-26 22:57       ` Johannes Schindelin
2006-06-27 20:38       ` [PATCH] " Johannes Schindelin

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=7vhd27j3v8.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.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