git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: Jan Engelhardt <jengelh@inai.de>,
	git@vger.kernel.org, James Coglan <jcoglan@gmail.com>
Subject: Re: Misrendering of git 2.25 log --graph
Date: Fri, 24 Jan 2020 22:26:03 +0100	[thread overview]
Message-ID: <20200124212603.GH6837@szeder.dev> (raw)
In-Reply-To: <3e9089c4-8ba6-b62c-cda3-607152790566@gmail.com>

On Fri, Jan 24, 2020 at 01:45:34PM -0500, Derrick Stolee wrote:
> 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. 


  reply	other threads:[~2020-01-24 21:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 23:12 Misrendering of git 2.24 log --graph Jan Engelhardt
2020-01-24 14:05 ` Derrick Stolee
2020-01-24 14:06   ` Derrick Stolee
2020-01-24 16:34     ` Misrendering of git 2.25 " Jan Engelhardt
2020-01-24 18:45       ` Derrick Stolee
2020-01-24 21:26         ` SZEDER Gábor [this message]
2020-01-24 16:08   ` Misrendering of git 2.24 " Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200124212603.GH6837@szeder.dev \
    --to=szeder.dev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jcoglan@gmail.com \
    --cc=jengelh@inai.de \
    --cc=stolee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).