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

Re: [PATCH] In `git log --graph`, default to --pretty=oneline --abbrev-commit

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 1, 2019, 10:45 UTC
Message-ID
<xmqqpnq6vwb6.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190325011717.GA5357@rigel>
Rafael Ascensão <rafa.almas@gmail.com> writes:
Show 7 quoted lines
> I agree that `pretty=medium` is sometimes hard to read and, as of now,
> `pretty=oneline` can be very misleading:
>
>     $ git log --graph --oneline todo~2..todo master~2..master
>
> This will look like you have a sequence of commits when in fact they are
> completely unrelated.

This is pretty much unrelated to which level of details should be the default, isn't it?

I do agree that --graph should be more intelligent around the root commits when showing two or more unrelated lines of histories.

Something like [*1*] from discussion in 2013 (not the patch that started the thread, for reasons stated in the thread, but ideas offered as alternative design in the discussion) would be the right way to solve it and it would work with all the log formatting options, whether --oneline, --pretty=medium, etc.

[Reference]
*1* http://public-inbox.org/git/1382717268-21884-1-git-send-email-milton.soares.filho@gmail.com/
Previous: Alex HenrieNext: Alex Henrie
Message 9 of 10 in “In `git log --graph`, default to --pretty=oneline --abbrev-commit”
  1. In `git log --graph`, default to --pretty=oneline --abbrev-commitAlex Henrie, Mar 23, 2019
  2. Abhisek Ghosh, Mar 23, 2019
  3. Junio C HamanoMar 24, 2019
  4. Ævar Arnfjörð BjarmasonMar 24, 2019
  5. Alex HenrieMar 24, 2019
  6. Rafael AscensãoMar 25, 2019
  7. Alex HenrieMar 25, 2019
  8. Alex HenrieMar 25, 2019
  9. Junio C HamanoApr 1, 2019
  10. Alex HenrieMar 27, 2019

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.