Repair stack upgrade with `stg branch --list`
commit818563dd36a823b3e78198e8e3db99497b39f7f5
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 17:53:39 +0000 (27 13:53 -0400)
treed0cf9461333921d193304201b2e3fa6359a07cdc
parent05900351a9ec7b774931a2a59c15c9f0b6d443f6
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>