-
Notifications
You must be signed in to change notification settings - Fork 24
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
Examples on usage #52
Comments
What you have looks like a good start, but here are some suggestions to consider:
If you do want to handle copies and renames:
You may also find the implementation of patch2pr useful. This isn't quite the same, as it uses the GitHub API instead of local files, but does show how to use the library. |
Thank you so much for such a thoughtful reply! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for this useful tool! I'm new to working with patches and have been experimenting with this tool.
I'm writing a script that takes a patch as a string from one copy of a repository and applies it to another copy of the same repository. Below is a sample of my code. I'm unsure if I'm using the tool correctly or handling all the cases properly.
Does this look like the correct usage? Specifically, I'm uncertain if I should handle each case with conditions like
file.IsNew
,file.IsCopy
, etc. Also I'm unsure if a binary can also beIsBinary
andIsNew
.The script works for my basic tests, which include creating, copying, and renaming files. Haven't yet tried with binaries. However, I'm concerned that I might not be accounting for all possible scenarios that a user could perform on a repo and my patch would miss those changes.
The text was updated successfully, but these errors were encountered: