stashed-changes
stash
clean worktree on main + 3 stashes, each touching a different file
Description
A repository with 3 distinct stashes preserved on top of a small 2-commit `main`. The worktree is clean; the stashes live only in `refs/stash` and the reflog. Each stash carries edits to a different file so applying any one is non-conflicting with the others. Useful for testing: - stash view list rendering + filter - per-entry actions: apply, pop, drop, checkout-file-from-stash - diff view in stash mode (file-by-file navigation inside a patch) - sidebar stashes-tab rendering
Contracts
- main has 2 commits
- worktree is clean
- git stash list reports 3 entries
- each stash touches a different file
Tags
Branches
main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('stashed-changes') npx git-scenarios create stashed-changes import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('stashed-changes', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
*-. 79423b5 (refs/stash) On main: WIP: experiment-c
|\ \
| | * 69a2165 untracked files on main: 0e3655b chore: baseline content for stashing
| * ec8f6a3 index on main: 0e3655b chore: baseline content for stashing
|/
* 0e3655b (HEAD -> main) chore: baseline content for stashing
* 257b4b9 chore: initial scaffold