The sound distributed version control system

#522 Tag seems to be a dead end command

Opened by joyously on August 21, 2021
joyously on August 21, 2021

I was able to create a tag (I think) since it gave me a hash as the result. How do I use a tag? How do I find a tag? How do I get at the info given when the tag was created? This doesn’t seem to be useful like tags are in other VCS.

spacefrogg on September 7, 2021

I just tested it myself and it is indeed confusing.

A tag, in my understanding, is a thing that holds a compressed version of a set of patches and gives that set a single “name”. It fulfills a similar purpose to tags in other VCS but is technically very different.

Here’s what I found out:

pijul tag create creates a tag and records it in the current channel. This will record the current state of the channel and will allow you to not only retrieve this state of the working directory (w/o untracked files, of course) but also the set of patches that led to this point.

pijul tag will show you the tags recorded in the current channel. (This one was undocumented and I found out by chance.) This means, pijul log won’t show them. And you cannot look into a tag with pijul change, either. (This is, because a tag is not a change but a thing that holds a set of changes.)

pijul tag checkout --to-channel <somename> <tag> will rematerialise the content of a tag in a channel named <somename>. After checking out and switching to channel <somename>, you will be able to see the log with pijul log and end up in the working tree that you had when you created the tag.

You should be able to push and pull tags, as well, but I haven’t figured that out, yet.

joyously on September 7, 2021

Are you able to submit a patch for the tag command’s help?