Repair stack upgrade with `stg branch --list`
commit689689adb35f984f9fd833a6b92d4bf50ac565b3
authorPeter Grayson <pete@jpgrayson.net>
Mon, 27 Sep 2021 17:50:07 +0000 (27 13:50 -0400)
committerPeter Grayson <pete@jpgrayson.net>
Mon, 27 Sep 2021 18:00:28 +0000 (27 14:00 -0400)
tree2c1e6f6198f0f7d188c06cc63f8ee6ab64db469d
parent818563dd36a823b3e78198e8e3db99497b39f7f5
Repair stack upgrade with `stg branch --list`

When upgrading from an old version 4 stack metadata format, which uses
refs/heads/<branch>.stgit branches, to version 5 in the context of `stg
branch --list`, only the first branch in need of upgrade would be
upgraded and then the branch listing code would experience an error due
to trying to access the just-deleted <branch>.stgit reference.

We solve this problem by making `stg branch --list` filter old-style
<branch>.stgit branches.

Repairs #155

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
stgit/commands/branch.py