git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [POSSIBLE REGRESSION] Spurious revs after patch "revision.c: --full-history fix"

From
Junio C Hamano <junkio@cox.net>
Date
Jul 2, 2006, 17:48 UTC
Message-ID
<7v64if6gpr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0607021012180.12404@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> 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.

Show 13 quoted lines
> 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.
Previous: Linus TorvaldsNext: Marco Costalba
Message 3 of 4 in “[POSSIBLE REGRESSION] Spurious revs after patch "revision.c: --full-history fix"”
  1. Marco CostalbaJul 2, 2006
  2. Linus TorvaldsJul 2, 2006
  3. Junio C HamanoJul 2, 2006
  4. Marco CostalbaJul 2, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.