You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to apply patches with trailing blank line removed #59
using patch -p0 < broken.patch but not with python-patch:
$ ./patch.py --debug broken.patch
DEBUG reading broken.patch
WARNING error: patch stream is incomplete!
DEBUG - 0 hunks for a.txt
DEBUG total files: 1 total hunks: 0
DEBUG normalize filenames
DEBUG patch type = plain
DEBUG source = a.txt
DEBUG target = b.txt
Traceback (most recent call last):
File "./patch.py", line 1193, in <module>
main()
File "./patch.py", line 1186, in main
patch.apply(options.strip, root=options.directory) or sys.exit(-1)
AttributeError: 'bool' object has no attribute 'apply'
To patch a.txt correctly using python-patch, one needs to provide the non-truncated patch file which contains the full three lines of context (with the last line consisting of a single trailing space):
Activity
swissembedded commentedon Jun 25, 2019
Had the same issue, very annoying as this lib is now used with conan package manager
techtonik commentedon Jan 1, 2021
How can I reproduce it with
gitlocally? Ideally on this repo.