Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 401
Open
Labels
Description
Much to my surprise reading delta.is_binary returns the wrong value if one does not iterate over the patches beforehand. Given
mkdir test&&cdtest touch README.md dd if=/dev/urandom of=data.bin bs=256K count=1 git init . git add README.md && git commit -m "initial" git add data.bin && git commit -m "binary"this script
importpygit2repo=pygit2.Repository('.git') diff=repo.diff('HEAD', 'HEAD~1') fordeltaindiff.deltas: print(delta.is_binary) forpatchindiff: passfordeltaindiff.deltas: print(delta.is_binary)prints
False True