To reproduce (assuming origin/gone doesn't exist):
> git branch gone
> git config branch.gone.remote origin
> git config branch.gone.merge refs/heads/gone
> git checkout gone
Switched to branch 'gone'
Your branch is based on 'origin/gone', but the upstream is gone.
(use "git branch --unset-upstream" to fixup)
Note (mostly for myself):
If origin does not exist, above repro will not cause git to report the branch being gone; origin (but not origin/gone) must exist.
https://github.com/dahlbyk/posh-git/pull/326 added support for Gone branch status, which is missing from this cache response. I'd suggest a boolean
UpstreamGone
property.To reproduce (assuming origin/gone doesn't exist):