feat: add --amend flag to carry over existing patch#7
Merged
Conversation
When `p12y patch <package> --amend` is used and a matching patch file exists in patches/, it is applied to the new workspace so users can continue editing from where they left off. Default behavior remains clean (no carry-over). Recovery handles partial failures via dry-run validation followed by git add/reset/clean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
uv hardlinks installed files to its cache by default. When users edit files in the patch workspace, the hardlink causes the cache entry to be modified too, corrupting subsequent installs of the same package. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nomyfan
added a commit
that referenced
this pull request
May 25, 2026
Sync SKILL.md with PR #7 which added the --amend option to `p12y patch`. Documents the flag in the command synopsis and in the standard workflow section, including fallback behaviour when the patch cannot be applied. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--amendflag top12y patchthat applies an existing patch file to the new workspace, so users can continue editing from where they left offgit add . && git reset --hard HEAD && git clean -fdXTest plan
find_existing_patch(found, not found, version mismatch)--amendcarries over existing patch into new workspace--amendrecovers to clean state (no modified files, no.rej, no ignored residue)🤖 Generated with Claude Code