Repository navigation
feat(log): commit trees + local/all branches + all refs - #560
Conversation
|
ehhhh Of course, I found an edge case after making the PR (as well as failing the CI for a silly fmt error). For some reason I found that the tree of https://github.com/shizunge/endlessh-go looks different between my
my my So the PR's branch logic is clearly not completely wrong, but it's inconsistent with Soon, I'll post a follow-up commit to this PR branch to fix the inconsistency, but leave the choice to you, dear maintainer. |
|
edit: should log current list merged commits? I'm unsure what is expected here (maybe master is broken? I rarely work with merges myself anymore). Don't see an issue with the graphs looking slightly different, they still mean the same, right? |
|
Thanks for your fast reply, and sorry for my slow response (blame my kids) and the confusion. I don't think anything is wrong with I think what needs to be decided is a matter of taste. In this current PR's code, log current/local branches gives a (flat) view that is different to It's easy to modify Also, if you care to analyse these differences, there's also a git discrepancy when sorting commits -- here's a message from my LLM assistant (in the context of the endlessh-go repo): One caveat worth knowing: this repo has heavy same-day commit bursts (dozens of dependabot merges all dated 2024-10-07, etc.), so the interleaving of equal-dated commits can differ slightly between libgit2's date heap and git's — e.g. git shows the 139 bump immediately under merge 139, while we show merge 138 first. The structure is complete |
|
ah, now that I'm experiementing with |
altsem
left a comment
There was a problem hiding this comment.
Code looks alright to me! I'll merge it in and then we'll take the rest from master :)
I did give it some test, seems to do what it's supposed to.



Greetings,
This PR adds commit trees to the log view, as well as the ability to view all local branches, all branches, or all refs. Screenshot of a snippet of gitu's history:
Excluding
src/git/tree.rs(a new file) and tests, the scope of the changes is small. At this point, I happily admit this PR is LLM-assisted - I used Qwen3.8-27b locally. I've heavily scrutinised all changes except past line 190 ofsrc/git/tree.rs, which is where my eyes glaze over from the rendering logic. However, I did manage to tighten up a bunch of the LLM-generated code after steering it toward a "readable"/"simple"/"maintainable" goal. With all that said, I'll happily respect your wishes if you don't want this contribution due to AI.Otherwise, please let me know what more I can do. I've been (extremely slowly) trying to get these tree views working for over 2 years now; it's something I can't live without, so it'd be great to see it gitu and I'm one step closer to leaving magit.