Skip to content

feat: add safer restore modes#25

Merged
dinakars777 merged 1 commit into
mainfrom
codex/safe-restore-modes
May 20, 2026
Merged

feat: add safer restore modes#25
dinakars777 merged 1 commit into
mainfrom
codex/safe-restore-modes

Conversation

@dinakars777
Copy link
Copy Markdown
Owner

Summary

Adds safer restore choices to the TUI so users are not forced through git reset --hard for every recovery path. Enter remains the hard-reset flow, but it now creates a backup ref first; s performs a soft reset, and c checks out the selected commit in detached HEAD.

The confirmation dialog now shows the exact Git command before execution, and full diff preview now compares HEAD against the selected target so the preview matches restore semantics instead of showing only the selected commit's patch.

Closes #17.

Verification

  • cargo fmt --check
  • cargo clippy -- -D warnings
  • cargo test
  • cargo build
  • git diff --check
  • cargo run -- --help

@dinakars777 dinakars777 merged commit 14b5b74 into main May 20, 2026
1 check passed
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.

Feature: Support soft resets and checkouts (non-destructive modes)

1 participant