| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR makes GitPython’s create_patch=True diff parsing robust against user Git configuration diff.mnemonicPrefix=true by forcing the standard a/ and b/ prefixes only for the patch output that GitPython parses into Diff objects.
Changes:
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/test_diff.py | Adds regression coverage for parsing patch diffs when diff.mnemonicPrefix=true, including NULL_TREE and ensuring no option leakage. |
| git/index/base.py | Forces standard prefixes for parsed patch output in the index’s empty-tree diff path. |
| git/diff.py | Forces standard prefixes for parsed patch output in the shared Diffable.diff() implementation when create_patch=True. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks, LGTM.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes #2013.
Validation
Note: the complete test/test_diff.py run has one pre-existing failure in TestDiff.test_diff_with_staged_file on this local Git version; the focused regression passes.
AI agent disclosure
This pull request was prepared and submitted by OpenAI Codex acting as an AI agent through the contributor account.