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

Re: [PATCH 2/2] graph: fix collapse of multiple edges

From
Jeff King <peff@peff.net>
Date
Jan 8, 2020, 13:49 UTC
Message-ID
<20200108134945.GA3390419@coredump.intra.peff.net>
In-Reply-To
<7a0e4637-85de-589f-df31-915b4603e45a@gmail.com>
On Wed, Jan 08, 2020 at 08:40:26AM -0500, Derrick Stolee wrote:
Show 23 quoted lines
> > Hmm. Your description and your diagrams make sense to me. But one
> > curious thing is that the earlier test you added for 6_* does not need
> > modified. Because it continues to show:
> > 
> >           | | | | * 6_F
> >           | |_|_|/|
> >           |/| | |/
> >           | | |/|
> >           | |/| |
> >           | * | | 6_D
> > 
> > rather than adding a horizontal component to the second-parent line.
> > That seems inconsistent.
> 
> The issue here is that there is not enough room for a second horizontal
> line. The horizontal line can only start after the previous has completely
> terminated, that is
> 
>            | | | | * 6_F
>            | |_|_|/|
>            |/| | |/
> 
> at this point, the first horizontal line has terminated.

Ahhh, OK, that makes perfect sense. I didn't quite realize how the rules for "going horizontal" worked.

Show 8 quoted lines
> If there was one more row to the example, then we would have:
> 
>            | | | | | * 6_F
>            | |_|_|_|/|
>            |/| | | |/
>            | | |_|/|
>            | |/| | |
>            | * | | | 6_D

Right, that makes sense. Thanks for explaining. And the patch otherwise looked good to me; your explanation convinced me that this is the right thing to do.

-Peff
Previous: Derrick StoleeNext: Junio C Hamano
Message 6 of 9 in “Graph horizontal fix”
  1. 0/2 Graph horizontal fixDerrick Stolee via GitGitGadget, Jan 8, 2020
  2. 1/2 graph: add test to demonstrate horizontal line bugDerrick Stolee via GitGitGadget, Jan 8, 2020
  3. 2/2 graph: fix collapse of multiple edgesDerrick Stolee via GitGitGadget, Jan 8, 2020
  4. Jeff KingJan 8, 2020
  5. Derrick StoleeJan 8, 2020
  6. Jeff KingJan 8, 2020
  7. Junio C HamanoJan 8, 2020
  8. Derrick StoleeJan 8, 2020
  9. Junio C HamanoJan 8, 2020

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.