Git development
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] git repack: keep commits hidden by a graft
Date: Fri, 24 Jul 2009 07:35:06 +0200	[thread overview]
Message-ID: <20090724053506.GB12855@atjola.homenet> (raw)
In-Reply-To: <7v8wievf20.fsf@alter.siamese.dyndns.org>

On 2009.07.23 22:13:43 -0700, Junio C Hamano wrote:
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> 
> > diff --git a/commit.c b/commit.c
> > index a47fb4d..ef8e911 100644
> > --- a/commit.c
> > +++ b/commit.c
> > @@ -262,7 +262,7 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
> >  		    bufptr[47] != '\n')
> >  			return error("bad parents in commit %s", sha1_to_hex(item->object.sha1));
> >  		bufptr += 48;
> > -		if (graft)
> > +		if (graft && (graft->nr_parent < 0 || grafts_replace_parents))
> >  			continue;
> 
> Hmm, what is this "if it is negative" check for?  I did not see it
> mentioned in the proposed commit log message.

That's for the special grafts for shallow clones. They override the
other grafts, and are identified by the negative nr_parent value. Those
have to stay in effect as the original parents aren't present in the
repo.

Björn

  reply	other threads:[~2009-07-24  5:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 15:33 [PATCH 0/2] Make git-gc more robust with regard to grafts Johannes Schindelin
2009-07-23 15:33 ` [PATCH 1/2] Add a test showing that 'git repack' throws away grafted-away parents Johannes Schindelin
2009-07-23 16:09   ` Björn Steinbrink
2009-07-23 15:33 ` [PATCH 2/2] git repack: keep commits hidden by a graft Johannes Schindelin
2009-07-24  5:04   ` Junio C Hamano
2009-07-24  9:36     ` Johannes Schindelin
2009-07-24  5:13   ` Junio C Hamano
2009-07-24  5:35     ` Björn Steinbrink [this message]
2009-07-24  9:37       ` Johannes Schindelin
2009-07-24 15:24         ` Junio C Hamano

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=20090724053506.GB12855@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /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