docker / gordon

Cli application to manage github pull requests
MIT License
176 stars 33 forks source link

'pulls reviewers' fails when patch includes binary file #140

Open shykes opened 10 years ago

shykes commented 10 years ago

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 <proppy@google.com>
Date:   Mon Jul 21 15:02:31 2014 -0700

    integration-cli/TestBuildAddTar: embed Dockerfile

    Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
bg451 commented 10 years ago

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.