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.
Are you able to submit a patch for the tag
command’s help?
It seems this has already happened since pijul tag --help
gives me the correct answer. I’m tagging this discussion as Beta, since there is still one test I want to do on tags before beta. That test is unlikely to impact the UX in any way though.
pijul tag create creates a tag and records it in the current channel.
The helps says “checkout Restore a tag into a new channel” Which is right (current or new channel)?
It seems this has already happened since pijul tag –help gives me the correct answer.
I think that’s only because you know what it means. When I look at the help, I get very little out of it. It doesn’t define what a tag is. It doesn’t suggest what this is good for. It doesn’t say that it lists tags or whether tags are only shown per channel or in the log or anything useful, like how to determine if the hash is a tag or a change, and what commands can utilize a tag.
The helps says “checkout Restore a tag into a new channel” Which is right (current or new channel)?
Checkout and create are different commands, one works with the current channel, the other one with a new channel.
Have you tried to use that command? I would like to understand what you think it does.
Anyway, I’m removing the Beta tag, since the feature I wanted to do (tags as channels) is now implemented, for example in the new command pijul tag reset
.
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.