Re: [PATCH v3 08/13] graph: tidy up display of left-skewed merges
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 16, 2019, 04:00 UTC
- Message-ID
- <xmqqsgnt8hlh.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <c34a5eb160310613cbde6313cda6cff753d6d7fd.1571183279.git.gitgitgadget@gmail.com>
"James Coglan via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 12 quoted lines
> This effect is applied to both "normal" two-parent merges, and to > octopus merges. It also reduces the vertical space needed for pre-commit > lines, as the merge occupies one less column than usual. > > Before: After: > > | * | * > | |\ | |\ > | | \ | * \ > | | \ |/|\ \ > | *-. \ > | |\ \ \
Looking at these drawings reminded me of a tangent that is brought up from time to time. We do not do great job when showing multiple roots.
If you have a history like this:
A---D---E
/
B---Cdrawing the graph _with_ the merge gives a reasonable representation of the entire topology.
* 46f67dd E
* 6f89516 D
|\
| * e6277a9 C
| * 13ae9b2 B
* afee005 ABut if you start drawing from parents of D (excluding D), you'd get this:
* e6277a9 C
* 13ae9b2 B
* afee005 Aand the fact that B and A do not share parent-child relationships is lost. An easy way to show that would be to draw the bottom three lines of the full history output we saw earlier:
| * e6277a9 C
| * 13ae9b2 B
* afee005 Aeither with or without the vertical bar to imply that A may have a child.
This is not something that has to be done as part of this series, but I am hoping that the internal simplification and code restructuring that is done by this series would make it easier to enhance the system to allow such an output.
Thanks.