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

Re: Assertion in git log graphing [regression in v2.25]

From
Derrick Stolee <stolee@gmail.com>
Date
Jan 7, 2020, 13:25 UTC
Message-ID
<5f956281-e861-f274-be43-95d99a625abb@gmail.com>
In-Reply-To
<20200107114812.GE1073219@coredump.intra.peff.net>
On 1/7/2020 6:48 AM, Jeff King wrote:
> The assertion itself is quite old, so I wondered if it was even still
> relevant. Removing it does produce a reasonable-looking graph:

As I'm digging into this case, and finding when the assertion is hit, I see that the issue is in the line further below your coloring issue:

Show 6 quoted lines
>   | | | | * dd068b4 Merge commit '8f076d8' into HEAD
>   | |_|_|/| 
>   |/| | |/  
>   | | |/|   
>   | |/| |   
>   | * | | 8f076d8 5

What is output is actually this, above. But the logic that includes the assert is checking where the underscores end, and the shown underscores actually pass the check. The issue is that it seems like it really wants to show this:

Show 5 quoted lines
>   | | | | * dd068b4 Merge commit '8f076d8' into HEAD
>   | |_|_|/| 
>   |/| |_|/  
>   | |/| |   
>   | * | | 8f076d8 5

Note that I dropped a line and compressed a slash into an underscore. It's on that line that this condition is being hit.

Now, is this really the intended behavior? Maybe. Looking at the previous tests in 54125-log-skewed-merges.sh, I don't see any where we have two skewed merges in the same merge.

Thanks, -Stolee

Previous: Eric SunshineNext: Jeff King
Message 8 of 12 in “Assertion in git log graphing”
  1. Bradley SmithJan 7, 2020
  2. Jeff KingJan 7, 2020
  3. Derrick StoleeJan 7, 2020
  4. Derrick StoleeJan 7, 2020
  5. Eric SunshineJan 7, 2020
  6. Derrick StoleeJan 7, 2020
  7. Eric SunshineJan 7, 2020
  8. Derrick StoleeJan 7, 2020
  9. Jeff KingJan 7, 2020
  10. Derrick StoleeJan 7, 2020
  11. Derrick StoleeJan 7, 2020
  12. Derrick StoleeJan 7, 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.