From: Junio C Hamano Date: Sun, 02 Jul 2006 17:48:16 GMT Subject: Re: [POSSIBLE REGRESSION] Spurious revs after patch "revision.c: --full-history fix" Message-ID: <7v64if6gpr.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus Torvalds writes: > Gaah. Does this trivial patch fix it for you? > > It had the wrong test for whether a commit was a merge. Gaah indeed -- I did not notice the logic error when I picked it up either, sorry. > diff --git a/revision.c b/revision.c > index 1cf6276..880fb7b 100644 > --- a/revision.c > +++ b/revision.c > @@ -997,7 +997,7 @@ struct commit *get_revision(struct rev_i > if (!revs->parents) > continue; > /* non-merge - always ignore it */ > - if (commit->parents && !commit->parents->next) > + if (!commit->parents || !commit->parents->next) > continue; > } > if (revs->parents) For a casual reader who is curious, the reason it matters to treat the "root" commit sanely in this example is because with the --remove-empty option the commits that add the specified paths are already made into "fake" root commits when the above function sees them (done in try_to_simplify_commit()). Thanks, Linus and Marco.