Skip to content

Fix detection of dirty working directory - #43

Closed
dashed wants to merge 1 commit into
masterfrom
codex/locate-and-fix-bug-in-codebase
Closed

Fix detection of dirty working directory#43
dashed wants to merge 1 commit into
masterfrom
codex/locate-and-fix-bug-in-codebase

Conversation

@dashed

@dashed dashed commented Jun 4, 2025

Copy link
Copy Markdown
Owner

Summary

  • ensure dirty_working_directory also detects untracked files
  • document logic for using git status
  • add tests verifying backup, merge and rebase fail with untracked files present

Testing

  • cargo fmt --all
  • cargo test --quiet -- --test-threads=1 | tail -n 20

https://chatgpt.com/codex/tasks/task_e_6827bf5735e48330b24993762023a769

dashed added a commit that referenced this pull request Feb 16, 2026
Add 5 integration tests covering all remaining MEDIUM priority gaps:
- Step mode + squash-merge Reset interaction (#41)
- Step mode + ignore-root flag (#42)
- Continue when git rebase still in progress (#43)
- Skip with --cleanup-backups flag (#44)
- Progress reporting during continue (#45)
@dashed

dashed commented Aug 24, 2026

Copy link
Copy Markdown
Owner Author

Closing as stale: targets pre-refactor src/main.rs (the function now lives at src/git_chain/core.rs) and no longer merges. The core change — treating untracked files as a dirty working directory — would make git-chain stricter than git itself: git rebase/merge/checkout all proceed with untracked files present and refuse only on actual collisions, which git-chain already inherits from its git subprocesses and safe checkouts. Blocking every chain operation on any untracked scratch file would be a UX regression with no safety gain. The error-message improvement from this PR (naming the current branch) is being applied separately.

@dashed dashed closed this Aug 24, 2026
dashed added a commit that referenced this pull request Aug 24, 2026
All four dirty-working-directory preflight errors (rebase, rebase
--continue/--skip, merge, backup) now say which branch the uncommitted
changes are on instead of the generic "in your working directory".

Salvaged from #43, which was closed as stale (the rest of that PR would
have made untracked files block chain operations — stricter than git
itself, with no safety gain).

Claude-Session: https://claude.ai/code/session_01HFbvr98FdyEJc9oPobc1LP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant