git-log--graph
git-log--graph copied to clipboard
deleted branches remain in graph viewer
here's the scenario.
- you have a remote branch
branch1 - locally you run
git fetch --all - the remote branch shows up in the extension as
origin/branch1 - elsewhere the remote branch gets deleted
- locally you run
git fetch --all, but the branch remains- if you try the built in 'Delete (remote)' menu command you get an error as the branch doesn't exist
- same for the 'Delete' menu command
solution is to run git branch --delete --remote origin/branch1, then a refresh on the viewer cleans it up ...until it happens again
One could argue that this is due to part of Git's design; remote-tracking branches don't go away automatically in clones if they're deleted on the remote. git fetch --prune will clear all remote-tracking branches that correspond to deleted branches on the remote, though. That can be configured to happen with every fetch by using Git's fetch.prune option.
i was trying to work within the extension. i tried this:
- use the
git fetch --allbutton from the extension view - click on
Keep window open after successso that you can edit this command - add
--pruneto the command andsave
unfortunately this is cleared the next time you click the button
doesn't look like this is going anywhere. closing.
I did not try to reproduce, but seem related to the option?
^ I dont see any "hide-quick-branch-tips" option tho, is it a git flag?
*EDIT: SMH I saw the option dunno why it did not pop on search
hi @rosmcmahon, the SAVE button seems to have been broken for global actions, for a long time. This is fixed now, so your strategy of adding --prune should work.
(This hasn't apparently bothered anyone else so far, but kinda makes sense: All default global actions have immediate: true set, meaning they don't expect the user to intervene and quickly close themselves again after. Modifying the args for the fetch action only works because it's a remote request and may or may not take a few seconds... very suboptimal UI, but kinda by design. I'm not very keen of revamping the entire logic just because of this very use case. One solution would be to make --prune the default for the fetch action. I'm unsure about that though, as we'd basically overwrite Git's suggested default way of doing things.)
There's an actual solution here though, I have extended the "Delete (remote)" action command a bit to hold
"args": "push \"$1\" --delete \"$2\" || git branch --delete --remote \"$2\""
and that should fix this issue for good.
(fix not yet released)
well this is the ideal solution 💯 👍
great updates to the UI visuals lately might i add!