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

From: Junio C Hamano <[email-masked]>
Date: Wed, 04 Dec 2024 08:32:18 +0900

Josh Brunton <[email-masked]> writes:

> 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:

> *   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.