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

Re: Misrendering of git 2.25 log --graph

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Jan 24, 2020, 21:26 UTC
Message-ID
<20200124212603.GH6837@szeder.dev>
In-Reply-To
<3e9089c4-8ba6-b62c-cda3-607152790566@gmail.com>
On Fri, Jan 24, 2020 at 01:45:34PM -0500, Derrick Stolee wrote:
Show 50 quoted lines
> On 1/24/2020 11:34 AM, Jan Engelhardt wrote:
> > On Friday 2020-01-24 15:06, Derrick Stolee wrote:
> >>
> >> I completely misread your ordering here. You are clear that this
> >> is an issue in 2.24 and NOT 2.25. Sorry.
> >>
> >> I'm not sure that there is anything to do since the graph rendering
> >> has changed so much, and we intend to keep the new version instead.
> > 
> > I now have a minimized reproducer, for *2.25*:
> > 
> > » ../git/git log --oneline --graph --all --decorate --topo-order
> > *   e1ee7b8 (HEAD -> master) Merge branch 'k9' into k10
> > |\  
> > | *   7b48214 Merge branch 'k8' into k9
> > | |\  
> > | | *   ed02a51 Merge branch 'blah' into k8
> > | | |\  
> > | | | * 44279cf blah
> > | | * |   4053c4d Merge branch 'k7' into k8
> > | | |\ \  
> > | |/ / /  
> > | | | _   
> > | | * 5b449d6 update 8.7 news
> > | |/  
> > | * 43a324f foo
> > |/  
> > * 5932a51 root
> 
> Hm. I get the above output for v2.24.1. Since you are using a
> specific path for your execution, then perhaps that version
> disagrees with the one on your PATH that reported "git version"?
> 
> For v2.25.0 I get this:
> 
> *   e1ee7b8 (HEAD -> master, origin/master, origin/HEAD) Merge branch 'k9' into k10
> |\  
> | *   7b48214 Merge branch 'k8' into k9
> | |\  
> | | *   ed02a51 Merge branch 'blah' into k8
> | | |\  
> | | | * 44279cf blah
> | | * | 4053c4d Merge branch 'k7' into k8
> | |/| | 
> | | |/  
> | | * 5b449d6 update 8.7 news
> | |/  
> | * 43a324f foo
> |/  
> * 5932a51 root
I get this good-looking graph with v2.25.0, too.
A few notes to add:
  - We don't need the topmost commit e1ee7b8 to reproduce that strange
    underscore below the kink with v2.24.0:
      $ git --no-pager log --oneline --graph --topo-order 7b48214
      *   7b48214 Merge branch 'k8' into k9
      |\  
      | *   ed02a51 Merge branch 'blah' into k8
      | |\  
      | | * 44279cf blah
      | * |   4053c4d Merge branch 'k7' into k8
      | |\ \  
      |/ / /  
      | | _   
      | * 5b449d6 update 8.7 news
      |/  
      * 43a324f foo
      * 5932a51 root
  - Git behaved like that up until about the middle of the patch
    series simplifying the graph output, namely until commit
    458152cce1 (graph: example of graph output that can be simplified,
    2019-10-15).  The next commit 0f0f389f12 (graph: tidy up display
    of left-skewed merges, 2019-10-15) changed the bahavior for the
    worse:
      *   7b48214 Merge branch 'k8' into k9
      |\  
      | *   ed02a51 Merge branch 'blah' into k8
      | |\  
      | | * 44279cf blah
      | * | 4053c4d Merge branch 'k7' into k8
      |/|\  
      | |/  
      | * 5b449d6 update 8.7 news
      |/  
      * 43a324f foo
      * 5932a51 root
    Notice how 4053c4d looks like an octopus merge, and 44279cf
    seemingly comes out of nowhere.
    And then the next commit d62893ecc1 (graph: commit and post-merge
    lines for left-skewed merges, 2019-10-15) seems to have fixed this
    issue, and we see the same good-looking graph that we get with
    v2.25.0 as well:
      *   7b48214 Merge branch 'k8' into k9
      |\  
      | *   ed02a51 Merge branch 'blah' into k8
      | |\  
      | | * 44279cf blah
      | * | 4053c4d Merge branch 'k7' into k8
      |/| | 
      | |/  
      | * 5b449d6 update 8.7 news
      |/  
      * 43a324f foo
      * 5932a51 root
  - Interestingly, the issue of an underscore below the kink is
    mentioned in the later commit 92beecc136 (graph: flatten edges
    that fuse with their right neighbor, 2019-10-15), quoting the last
    part of its log message:
      One of the test cases here cannot be correctly rendered in Git v2.23.0;
      it produces this output following commit E:
      
              | | *-. \   5_E
              | | |\ \ \
              | |/ / / /
              | | | / _
              | |_|/
              |/| |
      
      The new implementation makes sure that the rightmost edge in this
      history is not left dangling as above.
    This is part of the new test case 'log --graph with octopus merge
    with column joining its penultimate parent' in t4215 that was
    added in 92beecc136.  Usually when a commit both changes the code
    and add new tests, then that means that that new test would have
    failed on previous versions.  However, that is not the case here:
    I tried this new test case on earlier commits in that series, and
    it already succeed with commit d62893ecc1, i.e. the same commit
    that fixes Jan's cases. 
Previous: Derrick StoleeNext: Jan Engelhardt
Message 6 of 7 in “Misrendering of git 2.24 log --graph”
  1. Jan EngelhardtJan 23, 2020
  2. Derrick StoleeJan 24, 2020
  3. Derrick StoleeJan 24, 2020
  4. Jan EngelhardtJan 24, 2020
  5. Derrick StoleeJan 24, 2020
  6. SZEDER GáborJan 24, 2020
  7. Jan EngelhardtJan 24, 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.