]> arthur.barton.de Git - bup.git/commit
tag: use git.update_ref()
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 30 Dec 2021 20:31:55 +0000 (21:31 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 16 Jan 2022 20:08:00 +0000 (14:08 -0600)
commit84cb94e1feb584ae7c67d65c27b2ff1a8e01e489
tree5e068261ab9f2e411fceac00ad65d338c9d27a82
parent9cb01faba9bb2951c83c240ccff66b119710db3d
tag: use git.update_ref()

Even tag refs can be packed by git, so writing to a file
might cause issues. Call git update-ref for tags as well.

In order to do that properly (and allow 'bup tag' to keep
its ability to modify tags), change git.update_ref() to
take a 'force' argument that allows updating a ref even
if it already exists with an old value we don't know.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/cmd/tag.py
lib/bup/git.py