Show the branching structure in the log.
jugglerchris opened this issue Β· 31 comments
Is your feature request related to a problem? Please describe.
It can be useful seeing the branching/merging structure in the log view, in a similar way to git log --oneline --decorate --graph
Describe the solution you'd like
The graph view visible in the log window.
Describe alternatives you've considered
I haven't got any other alternatives other than not doing it. :-)
Definitely on my list aswell π
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
nop little bot, don't close that please! π
@bew volunteering to take a go at it? :)
That would have been a good idea, thanks for the offer, but not right now anyhow.
I'm in the long process of re doing all my configs properly, and I still far from having a proper rust editor setup (I'd also need to learn writing rust, not just read, this project could help bootstrap the process for sure, but I'm not ready for now)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
up ?
Still a planned feature? With this it will be perfect!
A few ideas how this could be visualized: https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs
suggestion: I hope we can merge, checkout and reset in the graph view
like the vscode extension name git graph
(https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph).
It would already be nice to just show the remote branches and local branches in the log viewer
@joseffilzmaier not sure what you mean. There is little chance to have multiple references be on the same branch (we only show a single branch currently)
If gitui
would ever draw more branches here's how libgit2 authors imagine it: https://github.com/libgit2/libgit2/blob/main/examples/log.c
Though they've not added the part that's related to --graph
but it can be deduced out of parents.
I put a bunch thought into this already. The biggest issue is keeping the revlog tab as efficient as it is right now.
I donβt want to start building a graph in memory to traverse. Itβs a matter of finding an efficient way to store everything needed to draw the graph structure and jump around everywhere.
another factor is being able to draw iteratively while not everything is parsed yet (like now)
the example in libgit2 unfortunately is too simple to cover any of these questions.
Yeah, definitely! Compromising speed is not an option.
Git internally uses commit-graph (from 2.24) to avoid reading whole blobs I can't tell if libgit2 has this feature already but that could be a starting point.
Git internally uses commit-graph (from 2.24) to avoid reading whole blobs I can't tell if libgit2 has this feature already but that could be a starting point.
@extrawurst Would this be solve the problem, if it existed in the rust binding for libgit2?
I can't tell if libgit2 has this feature already but that could be a starting point.
As of today:
For the record I think tig does a decent job of graph rendering in a terminal and wouldn't be a bad thing to copy.
For sure, open for PRs π
how about this repo here which also visualize Git history graphs. Maybe worth checking out @extrawurst. And this is also written in Rust, too
how about this repo here which also visualize Git history graphs. Maybe worth checking out @extrawurst. And this is also written in Rust, too
It's really not bad, but still get the frustration of not having a readable tree. GitKraken and SmartGit manage to make it just right.
git-graph does not have alternating colors for branches and that makes it hard to know the base of the branch and it's target for a merge
Here is what I would expect to have in gitui:
Some way to have my branches, different remotes (contributors or team members), tags. The colors alternating are very important.
Hi guys:
This issue seems to me the only killer feature missing in gitui at the moment. If you allow me to suggest something, I would prefer to draw the tree with simple unicode or ascii characters (like magit or tig already do) and then you can choose a fancy draw library if you like... but but once the basic is in... remember that some of us use old fashion terminals and very basic embedded systems (with ssh, serial or even worst... cmd from MS-Windows).
The issue certainly is not how to make it look good atm. Itβs just complex to get right on giant repos where not the entire list of commits is kept in memory let alone their ancestor relation info. The drawing then becomes the simple part
is this git log --graph not properly giving output to digest or the library is not properly supporting it?
gitui does not shell out fetching the revision log to be as performant as possible.
Hi, is there any progress on this feature?
There is also new interesting project Serie also written in Rust.
It is in official repo of Arch Linux.
There is also new interesting project Serie also written in Rust.
It is in official repo of Arch Linux.
That's amazing! But it requires iterm2/kitty image protocols, and even sixel is not supported. It would be great if such a TUI could be implemented without image protocols.
There is also new interesting project Serie also written in Rust.
It is in official repo of Arch Linux.That's amazing! But it requires iterm2/kitty image protocols, and even sixel is not supported. It would be great if such a TUI could be implemented without image protocols.
It works fine with terminals like gnome desktop but not Guake for example.
Please open an issue on their repo to support other protocols.
Also, judging by lusingander/serie#16, it just uses the git shell command under the hood, hence, it is of no use
+1 for the VSCode extension "Git Graph" visualization, that is excellent.