Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with binary files #60

Closed
dfishburn opened this issue Jan 20, 2016 · 5 comments
Closed

Error with binary files #60

dfishburn opened this issue Jan 20, 2016 · 5 comments

Comments

@dfishburn
Copy link

If I try to add a .zip file using S in the Magit window I get the following:

Error detected while processing function magit#stage_hunk[32]..magit#stage_block[11]..magit#git#git_apply:
line    8:
Git error: error: cannot apply binary patch to 'sqlanywhere/test/testdata_064A.zip' without full index line^@error: sqlanywhere/test/testdata_064A.zip: patch does not apply
line    9:
Git cmd: "C:\Program Files\Git\cmd\git.EXE" apply --recount --no-index --cached -
line   10:
Tried to aply this
line   11:
['diff --git a/sqlanywhere/test/testdata_064A.zip b/sqlanywhere/test/testdata_064A.zip', 'index dfb1dd7..6184e0a 100644', 'Binary files a/sqlanywhere/test/testdata_064A.zip and b/sqlanywh
ere/test/testdata_064A.zip differ', '']
@jreybert
Copy link
Owner

Hi dfishburn,

could you give me the output of the command:

:!file --mime sqlanywhere/test/testdata_064A.zip

Thanks

@dfishburn
Copy link
Author

The file utility does not exist on Windows.
I couldn't find any good alternatives for it either.

But, this is just a standard Zip file I created with the 7-zip open source utility.

@jreybert jreybert added the bug label Jan 21, 2016
@jreybert
Copy link
Owner

Well, that's a shame I do not check the result of system("file...") command...

I'll try to figure a way to detect binary files on windows. No matter that is just a simple zip file, if vimagit does not detect that a modified file is a binary, it will fail to stage this modified file.

@jreybert
Copy link
Owner

jreybert commented Feb 8, 2016

May also fix #61

jreybert added a commit that referenced this issue Feb 8, 2016
…diff parsing (fix #60, #61)

for the moment, git diff output is not localized in case of binary detection
@jreybert
Copy link
Owner

jreybert commented Feb 8, 2016

Hi @dfishburn , could you please try the branch dev/git_diff and tell me if it fixes this issue?

@jreybert jreybert added this to the Release 1.5.2 milestone Feb 8, 2016
jreybert added a commit that referenced this issue Feb 8, 2016
…diff parsing (fix #60, #61)

for the moment, git diff output is not localized in case of binary detection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants