gordon icon indicating copy to clipboard operation
gordon copied to clipboard

'pulls reviewers' fails when patch includes binary file

Open shykes opened this issue 11 years ago • 1 comments
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)

shykes avatar Jul 22 '14 00:07 shykes

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.

bg451 avatar Sep 15 '14 05:09 bg451