Expose merge and rebase operation state#70
Conversation
| if self.git_path("MERGE_HEAD")?.exists() { | ||
| return Ok(Some(RepositoryOperation::Merge)); | ||
| } | ||
| if self.git_path("rebase-merge")?.exists() || self.git_path("rebase-apply")?.exists() { |
There was a problem hiding this comment.
rebase-apply is not sufficient to identify a rebase: a paused git am session creates this directory too (with rebase-apply/applying). I reproduced this with an empty patch: git status reported "You are in the middle of an am session", while this branch would set status.operation to RepositoryOperation::Rebase and show REBASE IN PROGRESS. That makes the newly exposed typed state false and will also misdirect later recovery UX. Please distinguish the git am form (or model it separately) while retaining its existing guardrail. The test currently creates a bare rebase-apply directory, so it misses the real marker layout.
|
Fixed the paused
Verification:
|
|
ZERO CONCERNS Reviewed current head |
Summary
Verification
cargo fmt --all --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspaceFixes #53