whatthepatch icon indicating copy to clipboard operation
whatthepatch copied to clipboard

What The Patch!? -- A Python patch parsing library

Results 9 whatthepatch issues
Sort by recently updated
recently updated
newest added

Bumps [black](https://github.com/psf/black) from 22.10.0 to 24.3.0. Release notes Sourced from black's releases. 24.3.0 Highlights This release is a milestone: it fixes Black's first CVE security vulnerability. If you run Black...

dependencies

Given a git diff as follows (which only contains header but no diff since it is just renaming): ``` diff --git a/myfile2.txt b/myfile3.txt similarity index 100% rename from myfile2.txt rename...

diff with the --color option adds escape codes into the diff output that can confuse this module. Perhaps preprocess the input and strip all those out?

Hi @cscorley ! I was looking for a tool to parse combined diff to use inside my tool (https://github.com/ishepard/pydriller), and ended up here. In your documentation you state you can...

From my email > Hi Christopher, > > My name is James Davis. I'm a security researcher at Virginia Tech. > > The pypi module whatthepatch has 2 regular expressions...

I came across a git header that contained filenames with unicode. Git chose to wrap those in quotes. The regex `git_diffcmd_header` in `patch.py` couldn't parse the filenames out of the...

current `diffcmd_header`: `^diff.* (.+) (.+)$` fixed `diffcmd_header`: `^diff .* (.+) (.+)$` Using the old `diffcmd_header` may result in lines starting with words like "different" being incorrectly matched as a diff...

This library is great; thank you! Another helpful feature would be the reverse of the `parse` operations, namely turning a `diff` object back into a text patch.