Skip to content

fix: always restore unstaged changes - #1416

Merged
mrexox merged 2 commits into
evilmartians:masterfrom
mrexox:fix/always-restore-unstaged-changes
May 18, 2026
Merged

fix: always restore unstaged changes#1416
mrexox merged 2 commits into
evilmartians:masterfrom
mrexox:fix/always-restore-unstaged-changes

Conversation

@mrexox

@mrexox mrexox commented May 18, 2026

Copy link
Copy Markdown
Member

Closes #1369 #1400

Context

  • Creating a stash when no commit yet fails with bad state of partially staged files.
  • Interrupting with Ctrl+c leaves the directory with bad state of partially staged and unstaged files

Changes

  • Ensure restorations are called on interruption (or any other error)
  • Try creating the stash first before creating the unstaged diff

@mrexox
mrexox marked this pull request as ready for review May 18, 2026 14:58
@mrexox
mrexox merged commit cf4ab9e into evilmartians:master May 18, 2026
13 of 14 checks passed
@mrexox
mrexox deleted the fix/always-restore-unstaged-changes branch May 18, 2026 17:19
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.

Unstaged changes lost when patch restore fails after formatter rewrites

1 participant