-
Notifications
You must be signed in to change notification settings - Fork 84
feat: enhance create_patch to skip existing identical patches and apply incremental changes #1743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ly incremental changes
# Conflicts: # src/source/patch.rs # test/end-to-end/test_create_patch.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Enhance create_patch
to skip applying patches when there are no changes and generate incremental suffix-only diffs on top of existing patches.
- Introduce a temporary copy of the original source to apply existing patches and compute only new changes.
- Emit full diffs when no prior patches exist, and suffix-only diffs otherwise.
- Persist updated patch lists back to
.source_info.json
.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/source/create_patch.rs | Incremental patch logic, temp directory handling, and updating source info |
src/recipe/parser/source.rs | Made UrlSource fields public to allow push of newly created patches |
Comments suppressed due to low confidence (3)
src/source/create_patch.rs:83
- Add or update the doc comment for
create_patch
to describe the new incremental behavior and the conditions under which full vs. suffix-only diffs are generated.
];
src/source/create_patch.rs:175
- Include unit or integration tests that verify suffix-only diffs are correctly generated when existing patches are applied, as well as full diffs when none exist.
for entry in WalkDir::new(&target_dir)
src/recipe/parser/source.rs:390
- [nitpick] The field holds multiple URLs but is named
url
; consider renaming tourls
for consistency with theurls()
accessor.
pub url: Vec<Url>,
WIP