Skip to contentSkip to conversation

Failed binary detection.

DISCUSSION David Brown 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

A coworker has a branch with some large binary files (video test streams). Git doesn't seem to be detecting this file is binary, and is causing things that try to generate diffs to fail.

Specifically, he is unable to rebase his branch, getting an error:

.dotest/patch:3241:LD := ld
fatal: corrupt patch at line 84682
Patch failed at 0001.

Line 84682 is in the middle of what appear to be the binary contents of the large media file, with pluses inserted after newline.

Any advice on where to look or possibly how to fix this?

I was able to work around the problem by cherry picking the change instead of using rebase. git-format-patch generates a patch that is corrupt in the same way, which fails with 'git-am'.

Thanks,
Dave

#1 lore raw
Quoted 6 lines · David Brown

A coworker has a branch with some large binary files (video test streams). Git doesn't seem to be detecting this file is binary, and is causing things that try to generate diffs to fail.

Specifically, he is unable to rebase his branch, getting an error:

Quoted 8 lines

.dotest/patch:3241:LD := ld
fatal: corrupt patch at line 84682
Patch failed at 0001.

Line 84682 is in the middle of what appear to be the binary contents of the large media file, with pluses inserted after newline.

Any advice on where to look or possibly how to fix this?

See discussion of this issue in git archives, e.g.
http://marc.info/?t=119652720900002

Signature · 1 line
ldv
#2 lore raw
In reply to David Brown
Quoted 10 lines · On Fri, 21 Dec 2007 11:50:19 -0800 David Brown <[email protected]> wrote:

A coworker has a branch with some large binary files (video test streams). Git doesn't seem to be detecting this file is binary, and is causing things that try to generate diffs to fail.

Specifically, he is unable to rebase his branch, getting an error:

.dotest/patch:3241:LD := ld
fatal: corrupt patch at line 84682
Patch failed at 0001.

Quoted 9 lines

Line 84682 is in the middle of what appear to be the binary contents of the large media file, with pluses inserted after newline.

Any advice on where to look or possibly how to fix this?

I was able to work around the problem by cherry picking the change instead of using rebase. git-format-patch generates a patch that is corrupt in the same way, which fails with 'git-am'.

Dave,

Telling Git that the file is binary is likely all you need to do. Something like the following line in a .gitattributes file:

filename -diff

For more info see "man gitattributes".

HTH,
Sean