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

Re: Possible BUG in 'git log --parents'

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 7, 2007, 10:09 UTC
Message-ID
<7vps348qzi.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<e5bfff550707070249i6f3f7288uce1f922686f6e14d@mail.gmail.com>
"Marco Costalba" <mcostalba@gmail.com> writes:
Show 18 quoted lines
> git-rev-list shows parents correctly, git-log no, in particulary there
> is parent 913419f that is shown 3 times instead of 1. Testing on git
> repository.
>
> $ git-log --parents --pretty=raw addafaf92e -n1 -- diff.h
> commit addafaf92eeb86033da91323d0d3ad7a496dae83
> 913419fcc648dd43d7f7afdd94fa25aee4f9798a 913419fcc648dd43d7f7a
> fdd94fa25aee4f9798a ea726d02e9677a66586d7ffebe97f112ab6dab33
> 913419fcc648dd43d7f7afdd94fa25aee4f9798a 46a6c262
> 0ba421397eec627b8eb18eb530e694fc
> tree e3be15f54f01e3aa1f8ec830ac87da5f85a23480
> parent 6b94f1e404afc552e5139c4357331843f5be61ad
> parent 93b74bca86f59b8df410b6fd4803b88ee0f304bf
> parent ea726d02e9677a66586d7ffebe97f112ab6dab33
> parent b33aba518456bee97bde1fef4fe17ab6bf401bbe
> parent 6b1ddbdd6e02719ae2be55dc141a176187e5027e
> author Junio C Hamano <junkio@cox.net> 1138436169 -0800
> committer Junio C Hamano <junkio@cox.net> 1138436169 -0800

Line wrapping in the middle of a single object name makes it hard to read doesn't it?

The commit does have 5 parents, among which, three of them merge branches that do not touch the named paths (in this case it happens to be a single "diff.h") and parent simplification leads to the same ancestor.

I recall we added an extra logic in rev-list side to squash the parent commits that artificially becomes duplicate due to this history simplification logic, which we might want to port to git-log. However, I have a slight suspicion that we earlier decided not to do so on purpose with git-log and for a good reason. I do not have much energy left tonight to dig into this right now, but mailing list log and commit log messages for rev-list.c, builtin-log.c and builtin-rev-list.c might tell you more.

Previous: Marco CostalbaNext: Marco Costalba
Message 2 of 7 in “Possible BUG in 'git log --parents'”
  1. Marco CostalbaJul 7, 2007
  2. Junio C HamanoJul 7, 2007
  3. Marco CostalbaJul 7, 2007
  4. Marco CostalbaJul 7, 2007
  5. Junio C HamanoJul 8, 2007
  6. Marco CostalbaJul 8, 2007
  7. Marco CostalbaJul 8, 2007

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.