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

Highlighting a branch #46

Open
TamaMcGlinn opened this issue Feb 3, 2021 · 2 comments
Open

Highlighting a branch #46

TamaMcGlinn opened this issue Feb 3, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@TamaMcGlinn
Copy link
Contributor

TamaMcGlinn commented Feb 3, 2021

GitExtensions has this really important feature for having a good overview of the git log graph; the currently checked out branch is displayed in colour and all others gray. So if you execute :Flog -all then you see some commits above your current commit, but they are displayed in gray.

GitExtensions also has 'cntrl-shift-b' which makes the commit under the cursor coloured, and all its ancestors (everything else is gray). That means in a convoluted mess of merges, you can go to a commit and do that to see how that branch goes through the commit history. The highlighting remains until you press another keybinding to revert to the normal colouring again.

I think these are really important features also for VimFlog to have.

@rbong
Copy link
Owner

rbong commented Mar 7, 2021

Sorry for not answering this for a long time. This is another issue complicated by the fact that Flog is just a wrapper around git log. With a more fully fledged branch viewer you'd have a commit structure available so you can see things like ancestry, since you built the graph itself. We don't have that.

I'm hesitant to change how Flog works without a lot of support. There are other issues like #26 that this would solve too. But it's quite a rewrite and would change Flog a lot. Leaving this open.

@TamaMcGlinn
Copy link
Contributor Author

I have some experimental commits lying around that highlight the branch by making bold the text of every commit which is included in the current branch. It's a bit ugly, but it works. However, my first implementation is too slow to consider for a PR yet. If interested you can look into my fork branch bold_current_branch, or the version in branch_highlight which lets you pick a commit to highlight.

@rbong rbong added the enhancement New feature or request label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants