Skip to content

Explain recovery when stashed repository state cannot be restored - #935

Merged
sds merged 1 commit into
mainfrom
fix/stash-recovery-762
Nov 10, 2026
Merged

sds merged 1 commit into
mainfrom
fix/stash-recovery-762

Conversation

@sds

@sds sds commented Nov 10, 2026

Copy link
Copy Markdown
Owner

When setup or cleanup cannot restore stashed changes, the error now identifies the exact saved stash commit and gives a git stash branch recovery command. This addresses the locked-file cleanup failure reported in #762 without attempting another restore against the same locked file.

The original configuration-signature failure now leaves staged and unstaged changes intact; an integration regression test verifies that behavior. Real-Git tests inject failures while restoring the index, resetting the working tree, and applying the stash, then execute the advertised recovery command and verify the staged/unstaged contents and previous stash for both pre-commit and commit-msg contexts.

Validation: all 2,100 examples pass locally with 100% line coverage; focused stash/integration specs and RuboCop pass.

Closes #762.

@sds
sds merged commit bc9e7be into main Nov 10, 2026
20 checks passed
@sds
sds deleted the fix/stash-recovery-762 branch November 10, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On failure of a pre-commit hook, run git stash pop

1 participant