Overview
Implement tagging, stashing, and reference management operations to match isomorphic-git feature parity.
Commands to Implement
Acceptance Criteria (AC)
- AC1: Tag Creation - Can create both lightweight and annotated tags
- AC2: Tag Listing/Deletion - Can list all tags and delete specific tags
- AC3: Stash Functionality - Can stash, list, and pop stashes preserving working tree state
- AC4: Ref Expansion - Can expand short refs (e.g., "main") to full refs ("refs/heads/main")
- AC5: Ref Deletion - Can safely delete refs (branches, tags)
- AC6: Type Safety - All functions properly typed with strict TypeScript
Definition of Done (DoD)
Interop Test Method
// Test tags
await tsGit.tag({ fs, dir: repoDir, ref: 'v1.0.0', object: 'HEAD', message: 'Release 1.0.0' });
const tsGitTags = await tsGit.listTags({ fs, dir: repoDir });
// Compare with canonical git
execSync('git tag -a v1.0.0 -m "Release 1.0.0"', { cwd: '/tmp/ref-repo' });
const refTags = execSync('git tag -l', { cwd: '/tmp/ref-repo' }).toString().split('\n');
// Assertions: tsGitTags should match refTags
Validation Strategy:
- Create tags/stashes with ts-git and canonical git
- Compare ref storage (.git/refs/tags/, .git/refs/stash)
- Verify tag objects (for annotated tags) match
- Test stash reflog behavior
Priority
Medium - Important for release workflows and developer convenience
Dependencies
- Requires object storage (tag objects)
- Stash requires index manipulation
Overview
Implement tagging, stashing, and reference management operations to match isomorphic-git feature parity.
Commands to Implement
tag- Create a tag (lightweight or annotated)annotatedTag- Create an annotated tag with messagedeleteTag- Delete a taglistTags- List all tagsstash- Stash changes in working directorystashList- List stashesstashPop- Apply and remove stashexpandRef- Expand a shortened ref to full nameexpandOid- Expand a shortened OID to full hashdeleteRef- Delete a referenceAcceptance Criteria (AC)
Definition of Done (DoD)
Interop Test Method
Validation Strategy:
Priority
Medium - Important for release workflows and developer convenience
Dependencies