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

Re: [BUG] git-log shows first parent and repeated last for octopus merge

From
Junio C Hamano <junkio@cox.net>
Date
Oct 18, 2006, 19:02 UTC
Message-ID
<7v3b9l30sk.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0610181551150.14200@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 17 quoted lines
> Hi,
>
> On Wed, 18 Oct 2006, Jakub Narebski wrote:
>
>> When trying to find how many merges and how many octopus merges (merges with
>> more than two parents) are in git.git repository I have encountered the
>> following strange output of git-log:
>> 
>>  1000:jnareb@roke:~/git> git log --parents --full-history --max-count=1 \
>>    211232bae64bcc60bbf5d1b5e5b2344c22ed767e -- a//b
>>  commit 211232bae64bcc60bbf5d1b5e5b2344c22ed767e <last parent repeated>
>>  Merge: d0d0d0b... d0d0d0b... d0d0d0b... d0d0d0b... d0d0d0b...
>>  [...]
>
> This happens because a//b rewrites the history, i.e. the parents are 
> edited. IMHO it makes no sense at all to show the parents in such a case, 
> since they are bogus.

If the command line did not have --full-history, I would agree with you. The caller explicitly told us not to remove side branches that do not end up modifying the paths, and also told us, with --parent, to show parenthood information after removing intermediate commits that do not change the tree shape (with respect to the specified paths).

So it is showing what the user asked -- the user may not have understood what he was asking, but that is a separate problem, I would think.

Previous: Johannes SchindelinNext: A Large Angry SCM
Message 5 of 6 in “[BUG] git-log shows first parent and repeated last for octopus merge”
  1. Jakub NarebskiOct 18, 2006
  2. Johannes SchindelinOct 18, 2006
  3. Jakub NarebskiOct 18, 2006
  4. When rewriting parents, cull duplicatesJohannes Schindelin, Oct 18, 2006
  5. Junio C HamanoOct 18, 2006
  6. A Large Angry SCMOct 18, 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.