interactive-rebase-mid-edit
operation
interactive rebase paused at an edit action with 2 remaining picks
Description
A repository mid-interactive-rebase, stopped at the first commit
marked `edit`. Three commits are in the rebase range (`HEAD~3`);
the first was applied and the rebase paused so the user can amend it.
Two picks remain in `.git/rebase-merge/git-rebase-todo`.
Useful for testing:
- detecting interactive-rebase state (`.git/rebase-merge/interactive`)
- distinguishing `edit`-pause from conflict-pause (no conflict markers,
no `REBASE_HEAD`, HEAD is at the applied commit not a pre-apply detach)
- displaying the remaining todo list and the current edit position
- `git rebase --continue` / `--abort` flows in the edit (non-conflict) case Contracts
- a rebase is in progress (.git/rebase-merge/ exists)
- .git/rebase-merge/interactive exists
- HEAD is detached
- .git/rebase-merge/git-rebase-todo has at least 1 remaining pick
Tags
Branches
(no branch, rebasing main)main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('interactive-rebase-mid-edit') npx git-scenarios create interactive-rebase-mid-edit import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('interactive-rebase-mid-edit', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* a0afc60 (main) feat: add module c
* 895b026 feat: add module b
* 8c99000 (HEAD) feat: add module a
* f4ee0a9 chore: initial scaffold