jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.27k stars 605 forks source link

Setting main-options to --follow doesn't work well with commit graph #1296

Open CervEdin opened 10 months ago

CervEdin commented 10 months ago

The problem

The log --follow option doesn't play nice with the commit graph in Tig.

Examples

For example, in the tig repository, if you run

tig Makefile

and have the following two options set

set main-options = --follow
set main-view = commit-title:yes,graph=v2

then each sequence of continuous commit will show up as if it occurred on different branches

image

Another example, same options but runing tig book.md

6Y JFonseca ∙ Add testing docs to GitBook and add ignore file
6Y JFonseca │ ∙ Move screenshot link to the end of the table of contents
6Y JFonseca │ ∙ Link directly to screenshot album on flickr
6Y JFonseca │ │ ∙ Use Gitbook for generating the GitHub site files

and the corresponding git log --oneline --graph --follow book.md

...
* 4c6c5d8 Add testing docs to GitBook and add ignore file
...
* cef17fc Move screenshot link to the end of the table of contents
* ac6e3e3 Link directly to screenshot album on flickr
...
* 248592b Use Gitbook for generating the GitHub site files

This is not a problem if --follow is passed on the command line

tig --follow Makefile

it appears that in this case, the graph option is silently ignored.

image

Expected behavior

Ideally, specifying --follow with the commit graph activated would work similar to git log --graph --follow, and display which branch the commit was on.

Any advice on how to work around this for now would be appreciated.

System

tig version 2.5.1 ncursesw version 6.2.20201114 readline version 8.1

Happy to provide more information