Repository navigation
Print safe recovery commands for local branch and Worktree conflicts - #749
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Commands name their working directory with
git -C. Recovery stays a user choice, with ordinary Git refusal checks. Continuation advice accounts for occupied branches and paths, including main and Launch directory checkouts.Closes #120
Evidence
After:
cargo test --test acquisition_advicepasses all eight regressions, including retained Spec reproducers for linked, main and launch checkouts. Tests execute copied advice through a POSIX shell, verify literal paths containing spaces/quotes/command substitutions, and confirm Git refuses divergent pushes, unmerged branch deletion and dirty Worktree removal.cargo test -- --test-threads=8(two ignored unit tests),cargo clippy --all-targets -- -D warnings,cargo fmt --check, andgit diff --check main...HEAD.Test seams
Worktree::create_freshandWorktree::continue_existing: independent acquisition checks and existing ownership/preservation regression cases.Merge Danger
Door: two-way
Blast Radius: diagnostics
Changes recovery diagnostics; users choose whether to execute the printed commands.
Unaddressed findings
tests/acquisition_advice.rs, including successful Continuation from another parent directory while preserving the original checkout.3bd86aea7caf5ba9b94312c09fd4a719d48c7ee4...HEADand supporting code found no introduced findings. Checked shell command injection, checkout/path identity, acquisition and cleanup authority, and recovery preservation. In a network-disabled, resource-limited sandbox,cargo test --offline --locked --test acquisition_advice --test continuation -- --test-threads=2passed 17 tests, andcargo test --offline --locked --bin thirdshift worktree::acquisition_tests -- --test-threads=2passed 50 tests.Changed files left unread by review: none on either axis. Both reviewers read all eight changed files and reviewed the final correction.
Built with codex · gpt-6.1-sol · high