Skip to content

W6: Feat/pull checkout hardening - #51

Open
Saanvi521 wants to merge 4 commits into
mainfrom
feat/pull-checkout-hardening
Open

Saanvi521 wants to merge 4 commits into
mainfrom
feat/pull-checkout-hardening

Conversation

@Saanvi521

Copy link
Copy Markdown
Collaborator

Summary

  • add on a deleted file that is still in the index now stages the deletion, so a merge conflict can be resolved by deleting the file. A never-tracked path still raises "No such file".
  • WorkingTree.checkout(tree, conflicted_paths=...) writes conflicted files (with markers) to disk but keeps their pre-merge index entry, so they stay "not staged" until add. Plain checkout(tree) is unchanged. M3 owns refs, HEAD and pending merge state.
  • 12 new tests in tests/test_index.py cover fast-forward pull, unsafe-checkout refusals that change nothing, read-only status and diff, and the merge-result flow (markers, add, commit, clean status).

Validation

  • scripts/quality-check.sh
  • Manual testing, if applicable:

Checklist

  • The change is focused and easy to review.
  • Tests were added or updated for behavior changes.
  • Documentation was updated for user-facing or setup changes.
  • No secrets, generated artifacts, or local-only files are included.

Notes for Reviewers

@Saanvi521 Saanvi521 changed the title Feat/pull checkout hardening W6: Feat/pull checkout hardening Oct 14, 2026
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.

1 participant