Problem:
Users currently cannot mark specific points in history (like releases) with a permanent, human-readable name. They must rely on memorizing commit hashes.
Fix:
Implement pit tag to manage lightweight references in .pit/refs/tags/.
Technical Detail:
A tag is functionally identical to a branch, except it is expected not to move. We will create a new directory .pit/refs/tags and write the commit hash into files named after the tag. commands/checkout.py will need updates to resolve tags.
Behaviour:
Problem:
Users currently cannot mark specific points in history (like releases) with a permanent, human-readable name. They must rely on memorizing commit hashes.
Fix:
Implement
pit tagto manage lightweight references in.pit/refs/tags/.Technical Detail:
A tag is functionally identical to a branch, except it is expected not to move. We will create a new directory
.pit/refs/tagsand write the commit hash into files named after the tag.commands/checkout.pywill need updates to resolve tags.Behaviour:
pit tag <name>Creates a reference pointing to the current commit.
pit tagLists all tags.
pit checkout <tag>Switches HEAD to the commit pointed to by the tag.