From: Björn Steinbrink Date: Fri, 24 Jul 2009 05:35:06 GMT Subject: Re: [PATCH 2/2] git repack: keep commits hidden by a graft Message-ID: <20090724053506.GB12855@atjola.homenet> In-Reply-To: <7v8wievf20.fsf@alter.siamese.dyndns.org> On 2009.07.23 22:13:43 -0700, Junio C Hamano wrote: > Johannes Schindelin 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