All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Nick Edelen <sirnot@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, Nicolas Pitre <nico@cam.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Sam Vilain <sam@vilain.net>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	Jeff King <peff@peff.net>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	Andreas Ericsson <exon@op5.se>,
	Christian Couder <christian@couder.net>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 7/6 (v4)] support for commit grafts, slight change to general mechanism
Date: Wed, 21 Oct 2009 15:44:07 +0200	[thread overview]
Message-ID: <200910211544.08776.trast@student.ethz.ch> (raw)
In-Reply-To: <200910211115.25017.trast@student.ethz.ch>

Thomas Rast wrote:
> Nick Edelen wrote:
> > Adds support for graft commits in rev-cache (w/ test), and slightly alters
> > graft mechanism.  Before, parse_commit() checked the graft list on every
> > commit.  Now register_commit_graft() preemptively loads graft commits into
> > memory, and sets a new 'graft' flag in the object.  This allows awareness of
> > the commits' medical history without searching a (normally private) array upon
> > each commit.
> 
> I felt adventurous and merged the topic into my local build, but I get
> "error: duplicate graft data ..." in repositories with only a single
> line in .git/info/grafts, which bisects to this commit (1c0a666 in
> today's pu).

Here's the complaint in squashable form if you want to keep it as a
testcase:

diff --git i/t/t6001-rev-list-graft.sh w/t/t6001-rev-list-graft.sh
index b2131cd..49ba37b 100755
--- i/t/t6001-rev-list-graft.sh
+++ w/t/t6001-rev-list-graft.sh
@@ -110,4 +110,18 @@ do
 	"
 
 done
+
+duplicate_error="error: duplicate graft"
+
+test_expect_success 'duplicates: no false positives' '
+	echo $B0 $A2 > .git/info/grafts &&
+	! git rev-list -1 HEAD 2>&1 | grep -q "$duplicate_error"
+'
+
+test_expect_success 'duplicates: no false negatives' '
+	echo $B0 $A2 > .git/info/grafts &&
+	echo $B0 $A1 >> .git/info/grafts &&
+	git rev-list -1 HEAD 2>&1 | grep "$duplicate_error"
+'
+
 test_done


-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2009-10-21 13:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-07 14:11 [PATCH 7/6 (v4)] support for commit grafts, slight change to general mechanism Nick Edelen
2009-09-27 22:44 ` Nick Edelen
2009-09-29 16:34   ` Shawn O. Pearce
2009-09-30  8:00     ` Chris Johnsen
2009-10-19 20:31 ` Nick Edelen
2009-10-21  9:15   ` Thomas Rast
2009-10-21 13:44     ` Thomas Rast [this message]
2009-10-27 21:11     ` Nick Edelen

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=200910211544.08776.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=christian@couder.net \
    --cc=exon@op5.se \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nico@cam.org \
    --cc=peff@peff.net \
    --cc=sam@vilain.net \
    --cc=sirnot@gmail.com \
    --cc=spearce@spearce.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.