The sound distributed version control system

#696 [CONSISTENCY] a ghost tag

Opened by tankf33der on July 13, 2022
tankf33der on July 13, 2022

I can operate with a tag after deletion, this is wrong.

$ pijul init p1
$ cd p1
$ rm .ignore
$ touch a
$ pijul add a
$ pijul rec -am"."
$ pijul tag create -m"."
$ pijul tag delete 6Q
$ echo "a" >> a
$ pijul diff --short
M a
$ cksum a
2418082923 2 a
$ pijul tag reset 6Q
$ cksum a
4294967295 0 a
spacefrogg on July 18, 2022

A deleted tag is like an orphaned commit in git, not like a deleted tag in git.

I think, pijul is rather missing the same tooling as for changes that allow you to attach a tag, known by its hash, to another channel. Then, it immediately makes sense again to interact with a ‘deleted tag’. Additionally, just because you deleted the tag in channel ‘main’ doesn’t mean it doesn’t exist in some other channel or would exist again after the next pull from a remote. In contrast to git, tags are attached to channels and can be pushed/pulled. So, while not obvious, it makes perfect sense for a ‘deleted tag’ to still hang around in the repository.