Repository navigation
fix(repo): refuse a conflict stop that would overwrite an untracked file - #187
Conversation
The stop writes plaintext and sidecars with plain writes outside materialize. A file already on disk at one of those paths that the working tree's tree does not track is the user's own, typically an ignored local copy, and abort then deleted it. Refuse before any write. Resolves ADR-0049 q21. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f1c54286b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…uard A full clone with a sparse view can track a path the view never materialized. A file there is the user's own, so the conflict-stop guard no longer counts it as tracked. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A failed lookup now counts as untracked, a file standing where a parent directory must be is refused before any write, a directory at the path is named, and the message hints at a leftover sidecar. ADR-0049 q21 scopes the guard to merge, pick and rebase; the private-branch merge stop has none. Adds sidecar and blocked-parent tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 860adda4b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ry target The conflict-stop guard rejected a tracked file standing where the result puts a directory, though materialize removes it first. It also accepted a directory at a path the old tree tracks as a file. The decision is now a small function with unit tests for both transitions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary
Closes ADR-0049 q21. A stopped merge, pick or rebase writes protected conflict text and binary-conflict sidecars with plain writes, outside
materialize. If the user kept an ignored or untracked copy at that path (the usual "stop tracking, keep it ignored" move), the write replaced it, and since #186 abort then deletes the path.materialize_conflict_statenow refuses before any write when a plaintext or sidecar path exists on disk and the tree the working tree reflects does not track it. The message asks the user to move the file and retry.Not changed: a clean merge, pick or rebase still overwrites an untracked file that a materialized added file lands on. That is
materialize's behaviour and a wider decision (git refuses; here it has always overwritten).Tests
a_conflict_stop_refuses_to_overwrite_an_untracked_local_copy: the pick is refused, nothing in progress, tip unmoved, the local copy untouched. Fails with the guard disabled.🤖 Generated with Claude Code
Summary by CodeRabbit