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

Re: [RFC] Proposal to add a delimiter between unrelated history in git-log --graph --oneline

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 3, 2024, 23:32 UTC
Message-ID
<xmqqfrn49wcd.fsf@gitster.g>
In-Reply-To
<FNUesYPDfyA16MXr4g9q7vW9OQ6bfbUK1umvVjONQNgEsQJZV5sIvRX9MlHfRILe4-hhINNy59uNjywL4abyJT43JVYjXU0ofUGWKQo0lFA=@proton.me>
Josh Brunton <josh.brunton@proton.me> writes:
Show 11 quoted lines
> There is a clear disconnect between commits dec7d4c 7260dff, showing that
> they represent 2 unrelated histories. However, passing --oneline as well produces
> the following output:
> * e5698bf (main2) History 2 - Add SECURITY.md
> * 7260dff History 2 - Add .gitattributes
> * dec7d4c (HEAD -> main) History 1 - Add README.md
> * 3f25318 History 1 - Add gitignore
> ...
> I therefore suggest that a separator line (perhaps a blank line) might be
> added between unrelated histories which would otherwise seem related in --oneline
> --graph.
Please do not do this.
If you find this a good way to separate two lines of histories:
Show 6 quoted lines
> *   15177d2 (HEAD -> main) Merge branch 'main2'
> |\
> | * e5698bf (main2) History 2 - Add SECURITY.md
> | * 7260dff History 2 - Add .gitattributes
> * dec7d4c History 1 - Add README.md
> * 3f25318 History 1 - Add gitignore
then something like
  | * e5698bf (main2) History 2 - Add SECURITY.md
  | * 7260dff History 2 - Add .gitattributes
  * dec7d4c History 1 - Add README.md
  * 3f25318 History 1 - Add gitignore
would be much better than
  * e5698bf (main2) History 2 - Add SECURITY.md
  * 7260dff History 2 - Add .gitattributes
  * dec7d4c History 1 - Add README.md
  * 3f25318 History 1 - Add gitignore
that wastes valuable vertical screen estate.

I do not deeply care if the '|' part gets blanked out until two histories are merged, iow,

    * e5698bf (main2) History 2 - Add SECURITY.md
    * 7260dff History 2 - Add .gitattributes
  * dec7d4c History 1 - Add README.md
  * 3f25318 History 1 - Add gitignore
is fine as well.
Previous: Josh Brunton
Message 2 of 2 in “[RFC] Proposal to add a delimiter between unrelated history in git-log --graph --oneline”
  1. Josh BruntonDec 3, 2024
  2. Junio C HamanoDec 3, 2024

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.