Skip to content

Add pit tag Command To Give Readable Names To Commits #17

@BIJJUDAMA

Description

@BIJJUDAMA

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:

  • pit tag <name>
    Creates a reference pointing to the current commit.

  • pit tag
    Lists all tags.

  • pit checkout <tag>
    Switches HEAD to the commit pointed to by the tag.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions