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

Re: [PATCH] Fix "git log --parent -m" from emitting duplicated parent info

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 9, 2007, 06:19 UTC
Message-ID
<7vodimw142.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<e5bfff550707082246k39286517o58fe89d80e05e08@mail.gmail.com>
"Marco Costalba" <mcostalba@gmail.com> writes:
> Indeed we can use and _do_ use --full-history not only for printing
> all revisions but to _walk_ the tree in a certain way, different from
> default.

Yes, --full-history essentially tells the machnery to walk all side branches even when a merge takes all the specified paths from one parent's version. You will end up walking all five branches from the first pentapus "addafaf" in git.git history, even if history simplification with pathspec would have narrowed it down to three paths if you did not give that option.

> IMHO --parents + --full-history is absolutely legal because the first
> flag indicate how to walk the tree and the second flag indicate what
> to show to the user.

I think we are in agreement. You are telling the machinery to walk all five branches with --full-history. But you are not telling the machinery to keep the intermediate commits (i.e. you do not give --sparse), so these five branches can be simplified to lead to the same parent. I think I was confused by dense vs simplify_history when I wrote that message in the thread Johannes pointed out:

	http://thread.gmane.org/gmane.comp.version-control.git/29222

Making the duplicate parent removal depend on "dense" makes sense, but the rewrite_parent() codepath is used only when dense anyway.

Thanks for a timely objection and sanity checking.
Previous: Marco Costalba
Message 10 of 10 in “Fix "git log --parent -m" from emitting duplicated parent info”
  1. Fix "git log --parent -m" from emitting duplicated parent infoMarco Costalba, Jul 8, 2007
  2. Junio C HamanoJul 8, 2007
  3. Junio C HamanoJul 9, 2007
  4. Johannes SchindelinJul 9, 2007
  5. Junio C HamanoJul 9, 2007
  6. Junio C HamanoJul 9, 2007
  7. Johannes SchindelinJul 9, 2007
  8. Junio C HamanoJul 9, 2007
  9. Marco CostalbaJul 9, 2007
  10. Junio C HamanoJul 9, 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.