tpope / vim-flagship

flagship.vim: Configurable and extensible tab line and status line

Home Page:http://www.vim.org/scripts/script.php?script_id=5199

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

show remote branch status in flagship

gauteh opened this issue · comments

this might be of interest: a small statusline indicator to show whether the current branch is uptodate with its remote: https://github.com/gauteh/vim-remote-status

depends on fugitive as well, hopefully this doesn't already exist within fugitive, but I doubt it because of the remote updateshenanigans (if it doesn't and it would be interesting there, let me know). on the other hand, it would be amazing if fugitive#ReloadStatus triggers some event I could hook into since updating the status is a little bit unreliable now.

remote-status

Fugitive doesn't have anything like this. I think it would be a nice addition, but it needs to be done without spamming system() calls, because that can make Vim really sluggish.

As far as the hook you are looking for, I would expect that BufReadPost index would be good enough.

You can't avoid the merge-base call but you can avoid calling it over and over again with the same arguments. Otherwise, I'll accept "fast enough" if you test it on a thrashing Windows machine.

I should probably go ahead and clarify that the "run git remote update repeatedly" part of things isn't something that I think belongs in Fugitive.