# Requirements Archive: v1.2 More Commands Support

**Archived:** 2026-01-20
**Status:** SHIPPED

This is the archived requirements specification for v1.2.
For current requirements, see `.planning/REQUIREMENTS.md` (created for next milestone).

---

# Requirements: GitSL v1.2

**Defined:** 2026-01-19
**Core Value:** Git commands execute correctly against Sapling repos without the calling tool knowing the difference

## v1.2 Requirements

Requirements for v1.2 More Commands Support. Each maps to roadmap phases.

### Direct Mappings

- [x] **SHOW-01**: `git show` translates to `sl show` with pass-through flags
- [x] **SHOW-02**: `git show <commit>` shows specified commit
- [x] **BLAME-01**: `git blame <file>` translates to `sl annotate <file>`
- [x] **BLAME-02**: `git blame` passes through common flags (-L, -w)
- [x] **RM-01**: `git rm <files>` translates to `sl remove <files>`
- [x] **RM-02**: `git rm -f` translates to `sl remove -f`
- [x] **RM-03**: `git rm -r` translates to `sl remove` (recursive by default)
- [x] **MV-01**: `git mv <src> <dst>` translates to `sl rename <src> <dst>`
- [x] **MV-02**: `git mv -f` translates to `sl rename -f`
- [x] **CLEAN-01**: `git clean -f` translates to `sl purge`
- [x] **CLEAN-02**: `git clean -fd` translates to `sl purge` (dirs included by default)
- [x] **CLEAN-03**: `git clean -n` translates to `sl purge --print` (dry run)
- [x] **CLONE-01**: `git clone <url>` translates to `sl clone <url>`
- [x] **CLONE-02**: `git clone <url> <dir>` translates to `sl clone <url> <dir>`
- [x] **GREP-01**: `git grep <pattern>` translates to `sl grep <pattern>`
- [x] **GREP-02**: `git grep` passes through common flags (-n, -i, -l)
- [x] **CONFIG-01**: `git config <key>` translates to `sl config <key>`
- [x] **CONFIG-02**: `git config <key> <value>` translates to `sl config <key> <value>`
- [x] **CONFIG-03**: `git config --list` translates to `sl config`

### Stash/Shelve

- [x] **STASH-01**: `git stash` translates to `sl shelve`
- [x] **STASH-02**: `git stash push` translates to `sl shelve`
- [x] **STASH-03**: `git stash -m "msg"` translates to `sl shelve -m "msg"`
- [x] **STASH-04**: `git stash pop` translates to `sl unshelve`
- [x] **STASH-05**: `git stash apply` translates to `sl unshelve --keep`
- [x] **STASH-06**: `git stash list` translates to `sl shelve --list`
- [x] **STASH-07**: `git stash drop` translates to `sl shelve --delete`

### Checkout/Switch/Restore

- [x] **CHECKOUT-01**: `git checkout <commit>` translates to `sl goto <commit>`
- [x] **CHECKOUT-02**: `git checkout <branch>` translates to `sl goto <bookmark>`
- [x] **CHECKOUT-03**: `git checkout <file>` translates to `sl revert <file>`
- [x] **CHECKOUT-04**: `git checkout -- <file>` translates to `sl revert <file>`
- [x] **CHECKOUT-05**: `git checkout -b <name>` creates bookmark and switches to it
- [x] **CHECKOUT-06**: Checkout disambiguates between commit/branch/file correctly
- [x] **SWITCH-01**: `git switch <branch>` translates to `sl goto <bookmark>`
- [x] **SWITCH-02**: `git switch -c <name>` translates to `sl bookmark <name>`
- [x] **RESTORE-01**: `git restore <file>` translates to `sl revert <file>`
- [x] **RESTORE-02**: `git restore .` translates to `sl revert --all`

### Branch/Bookmark

- [x] **BRANCH-01**: `git branch` lists bookmarks via `sl bookmark`
- [x] **BRANCH-02**: `git branch <name>` creates bookmark via `sl bookmark <name>`
- [x] **BRANCH-03**: `git branch -d <name>` deletes bookmark via `sl bookmark -d <name>`
- [x] **BRANCH-04**: `git branch -D <name>` force deletes via `sl bookmark -d <name>`

## v2 Requirements (Deferred)

Tracked for future release:

### Output Format Transformation

- **BLAME-FMT**: Transform blame output to match git format exactly
- **BRANCH-FMT**: Transform branch list output to match git format
- **STASH-FMT**: Transform stash list output to match git format

### Advanced Stash

- **STASH-REF**: Support `stash@{n}` syntax for referencing older stashes
- **STASH-PARTIAL**: Support `git stash -p` for partial stashing

### Advanced Checkout

- **CHECKOUT-DETACH**: Support `git checkout --detach`
- **CHECKOUT-TRACK**: Support `git checkout --track`

## Out of Scope

Explicitly excluded. Documented to prevent scope creep.

| Feature | Reason |
|---------|--------|
| `git revert` | Maps to `sl backout`, not `sl revert` - semantic confusion risk |
| `git merge` | Sapling prefers rebase workflow |
| `git rebase` | Complex flag translation, use sl rebase directly |
| `git push/pull/fetch` | Remote model differs fundamentally |
| `git stash -p` | Interactive, requires terminal control |
| `stash@{n}` syntax | Sapling uses named shelves, different model |
| `--staged` flag | No staging area in Sapling |

## Traceability

Phase mappings for v1.2 requirements.

| Requirement | Phase | Status |
|-------------|-------|--------|
| SHOW-01 | Phase 15 | Complete |
| SHOW-02 | Phase 15 | Complete |
| BLAME-01 | Phase 15 | Complete |
| BLAME-02 | Phase 15 | Complete |
| RM-01 | Phase 15 | Complete |
| RM-02 | Phase 15 | Complete |
| RM-03 | Phase 15 | Complete |
| MV-01 | Phase 15 | Complete |
| MV-02 | Phase 15 | Complete |
| CLONE-01 | Phase 15 | Complete |
| CLONE-02 | Phase 15 | Complete |
| GREP-01 | Phase 15 | Complete |
| GREP-02 | Phase 15 | Complete |
| CLEAN-01 | Phase 16 | Complete |
| CLEAN-02 | Phase 16 | Complete |
| CLEAN-03 | Phase 16 | Complete |
| CONFIG-01 | Phase 16 | Complete |
| CONFIG-02 | Phase 16 | Complete |
| CONFIG-03 | Phase 16 | Complete |
| SWITCH-01 | Phase 16 | Complete |
| SWITCH-02 | Phase 16 | Complete |
| BRANCH-01 | Phase 17 | Complete |
| BRANCH-02 | Phase 17 | Complete |
| BRANCH-03 | Phase 17 | Complete |
| BRANCH-04 | Phase 17 | Complete |
| RESTORE-01 | Phase 17 | Complete |
| RESTORE-02 | Phase 17 | Complete |
| STASH-01 | Phase 18 | Complete |
| STASH-02 | Phase 18 | Complete |
| STASH-03 | Phase 18 | Complete |
| STASH-04 | Phase 18 | Complete |
| STASH-05 | Phase 18 | Complete |
| STASH-06 | Phase 18 | Complete |
| STASH-07 | Phase 18 | Complete |
| CHECKOUT-01 | Phase 19 | Complete |
| CHECKOUT-02 | Phase 19 | Complete |
| CHECKOUT-03 | Phase 19 | Complete |
| CHECKOUT-04 | Phase 19 | Complete |
| CHECKOUT-05 | Phase 19 | Complete |
| CHECKOUT-06 | Phase 19 | Complete |

**Coverage:**
- v1.2 requirements: 40 total
- Shipped: 40
- Adjusted: 0
- Dropped: 0

---

## Milestone Summary

**Shipped:** 40 of 40 v1.2 requirements
**Adjusted:** None
**Dropped:** None

---
*Archived: 2026-01-20 as part of v1.2 milestone completion*
