gordon
gordon copied to clipboard
'pulls reviewers' fails when patch includes binary file
trafficstars
This happens when running pulls reviewers 7140 when targeting github.com/dotcloud/docker.
$ pulls reviewers 7140
unexpected Git patch header: Binary files a/integration-cli/build_tests/TestBuildAddTar/1/test.tar and /dev/null differ
For reference here is the commit referenced by that pull request:
commit 5d8e80ba8da808fb70d529711359e2d826db2407
Author: Johan Euphrosine <[email protected]>
Date: Mon Jul 21 15:02:31 2014 -0700
integration-cli/TestBuildAddTar: embed Dockerfile
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <[email protected]> (github: proppy)
I've been looking into this and it seems the that code.google.com/p/go.codereview/patch library only supports binary literal diffs and not deltas. So when it is parsing a diff that has a binary file, it looks for the "GIT binary patch" and if that isn't found it returns the error you saw. The reason pulls diff 7140 doesn't throw an error is because it never parses the diff.