Better stack rename abstraction
commit1a7afd9875f5e4b732a1468f49c01452dc4574e3
authorPeter Grayson <pete@jpgrayson.net>
Mon, 21 Dec 2020 02:33:41 +0000 (20 21:33 -0500)
committerPeter Grayson <pete@jpgrayson.net>
Mon, 21 Dec 2020 02:33:41 +0000 (20 21:33 -0500)
treefbadbc4ecb30e2d0ec596d26f954ff29eaea9f96
parent40de751b3a41e4947b9399869bcbaa45146f93e5
Better stack rename abstraction

The new Refs.rename() method encapsulates the execution of `git
update-ref` such that Stack.rename() no longer executes update-ref
directly.

Stack.rename() is further updated to incorporate the rename of the
metadata branch (i.e. <branch>.stgit). This was previously performed in
commands/branch.py, but since the metadata branch is part-and-parcel to
a Stack, it makes sense that a Stack rename must also rename its
associated metadata ref.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
stgit/commands/branch.py
stgit/lib/git/repository.py
stgit/lib/log.py
stgit/lib/stack.py