Skip to content

fix: apply stage_fixed only if it is safe - #1418

Merged
mrexox merged 2 commits into
evilmartians:masterfrom
mrexox:fix/apply-stage_fixed-only-if-it-is-safe
May 19, 2026
Merged

fix: apply stage_fixed only if it is safe#1418
mrexox merged 2 commits into
evilmartians:masterfrom
mrexox:fix/apply-stage_fixed-only-if-it-is-safe

Conversation

@mrexox

@mrexox mrexox commented May 18, 2026

Copy link
Copy Markdown
Member

Closes #1400

Context

Before adding files due to stage_fixed: true we must check if restoring unstaged changes is applicable. If not – revert the state to what it was before the hook and fail.

Changes

  • Implement applying only if it's safe to restore unstaged changes
  • Add tests
  • Find a better name for stageFixedFiles type

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.

When Hooks Fail or get Interrupted Staged Files/Changes are lost

1 participant