Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show the branching structure in the log. #81

Open
jugglerchris opened this issue May 20, 2020 · 26 comments
Open

Show the branching structure in the log. #81

jugglerchris opened this issue May 20, 2020 · 26 comments
Labels
enhancement New feature or request pinned

Comments

@jugglerchris
Copy link

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. :-)

@extrawurst
Copy link
Owner

Definitely on my list aswell 👍

@extrawurst extrawurst added the enhancement New feature or request label May 21, 2020
@extrawurst extrawurst added this to the v0.9 milestone Jul 9, 2020
@extrawurst extrawurst removed this from the v0.9 milestone Jul 29, 2020
@stale

This comment has been minimized.

@stale stale bot added the wontfix This will not be worked on label Oct 27, 2020
@bew

This comment has been minimized.

@stale stale bot removed the wontfix This will not be worked on label Oct 27, 2020
@extrawurst

This comment has been minimized.

@bew

This comment has been minimized.

@stale

This comment has been minimized.

@stale stale bot added the wontfix This will not be worked on label Jan 26, 2021
@stale stale bot closed this as completed Feb 2, 2021
@kiuKisas

This comment has been minimized.

@kting28
Copy link

kting28 commented Apr 22, 2021

Still a planned feature? With this it will be perfect!

@extrawurst
Copy link
Owner

A few ideas how this could be visualized: https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs

@MaiLunJiye
Copy link

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).

@joseffilzmaier
Copy link

It would already be nice to just show the remote branches and local branches in the log viewer

@extrawurst
Copy link
Owner

@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)

@P4Cu
Copy link

P4Cu commented Jan 30, 2022

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.

@extrawurst
Copy link
Owner

extrawurst commented Jan 30, 2022

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.

@P4Cu
Copy link

P4Cu commented Jan 30, 2022

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.

@tony
Copy link

tony commented Feb 9, 2022

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:

libgit2:

git2: nothing yet

@hgezim
Copy link

hgezim commented Sep 14, 2022

I think gitup does visualizations the best by far:

CleanShot 2022-09-14 at 12 55 36@2x

@timabell
Copy link
Contributor

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.
shutter_2022-09-27_04

@extrawurst
Copy link
Owner

For sure, open for PRs 😉

@huyhoang160593
Copy link

how about this repo here which also visualize Git history graphs. Maybe worth checking out @extrawurst. And this is also written in Rust, too

@williamdes
Copy link

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:
image
Some way to have my branches, different remotes (contributors or team members), tags. The colors alternating are very important.

@Ergus
Copy link

Ergus commented Feb 4, 2023

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).

@extrawurst
Copy link
Owner

extrawurst commented Feb 4, 2023

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

@soloturn
Copy link

is this git log --graph not properly giving output to digest or the library is not properly supporting it?

@extrawurst
Copy link
Owner

gitui does not shell out fetching the revision log to be as performant as possible.

@petertheprocess
Copy link

Hi, is there any progress on this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned
Projects
None yet
Development

No branches or pull requests