techtonik / python-patch

Library to parse and apply unified diffs
https://pypi.python.org/pypi/patch
112 stars 65 forks source link

trouble with strip level with git patches #49

Open Trophime opened 7 years ago

Trophime commented 7 years ago

Hi, I have created patches using let's say git format-patch -1 To apply the patch using regular patch command line I apply: patch -p1 < patch

When trying to use instead patch.py I've tried patch.py -p1 -- < patch It fails

You have to apply: -p0 to get patch.py to work This is very disturbing behaviour... Would it be possible to use the same strip level as in regular patch

Best