{"thread":{"id":"11386","subject":"Failed binary detection.","startedAt":"2007-12-21T19:50:19Z","lastAt":"2007-12-21T23:02:18Z","messageCount":3,"participants":["David Brown","Dmitry V. Levin","Sean"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"63948","messageId":"20071221195019.GA20668@old.davidb.org","threadId":"11386","inReplyTo":null,"subject":"Failed binary detection.","fromName":"David Brown","fromEmail":"git@davidb.org","sentAt":"2007-12-21T19:50:19Z","receivedAt":"2007-12-21T19:50:19Z","isPatch":false,"sender":{"key":"git@davidb.org","avatar":"https://gravatar.com/avatar/94c86a2938470a74c2eac5e2b69afc0871f79a660295c02219597aba8cb101c1?d=mp&s=160"},"body":"A coworker has a branch with some large binary files (video test streams).\nGit doesn't seem to be detecting this file is binary, and is causing things\nthat try to generate diffs to fail.\n\nSpecifically, he is unable to rebase his branch, getting an error:\n\n.dotest/patch:3241:LD   := ld\nfatal: corrupt patch at line 84682\nPatch failed at 0001.\n\nLine 84682 is in the middle of what appear to be the binary contents of the\nlarge media file, with pluses inserted after newline.\n\nAny advice on where to look or possibly how to fix this?\n\nI was able to work around the problem by cherry picking the change instead\nof using rebase.  git-format-patch generates a patch that is corrupt in the\nsame way, which fails with 'git-am'.\n\nThanks,\nDave\n"},{"id":"63965","messageId":"20071221230045.GA9442@wo.int.altlinux.org","threadId":"11386","inReplyTo":"20071221195019.GA20668@old.davidb.org","subject":"Re: Failed binary detection.","fromName":"Dmitry V. Levin","fromEmail":"ldv@altlinux.org","sentAt":"2007-12-21T23:00:45Z","receivedAt":"2007-12-21T23:00:45Z","isPatch":false,"sender":{"key":"ldv@altlinux.org","avatar":"https://avatars.githubusercontent.com/u/5281408?v=4"},"body":"On Fri, Dec 21, 2007 at 11:50:19AM -0800, David Brown wrote:\n> A coworker has a branch with some large binary files (video test streams).\n> Git doesn't seem to be detecting this file is binary, and is causing things\n> that try to generate diffs to fail.\n> \n> Specifically, he is unable to rebase his branch, getting an error:\n> \n> .dotest/patch:3241:LD   := ld\n> fatal: corrupt patch at line 84682\n> Patch failed at 0001.\n> \n> Line 84682 is in the middle of what appear to be the binary contents of the\n> large media file, with pluses inserted after newline.\n> \n> Any advice on where to look or possibly how to fix this?\n\nSee discussion of this issue in git archives, e.g.\nhttp://marc.info/?t=119652720900002\n\n\n-- \nldv\n"},{"id":"63966","messageId":"BAYC1-PASMTP0471A96A025F672FF637C8AE5E0@CEZ.ICE","threadId":"11386","inReplyTo":"20071221195019.GA20668@old.davidb.org","subject":"Re: Failed binary detection.","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2007-12-21T23:02:18Z","receivedAt":"2007-12-21T23:02:18Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Fri, 21 Dec 2007 11:50:19 -0800\nDavid Brown <git@davidb.org> wrote:\n\n> A coworker has a branch with some large binary files (video test streams).\n> Git doesn't seem to be detecting this file is binary, and is causing things\n> that try to generate diffs to fail.\n> \n> Specifically, he is unable to rebase his branch, getting an error:\n> \n> .dotest/patch:3241:LD   := ld\n> fatal: corrupt patch at line 84682\n> Patch failed at 0001.\n> \n> Line 84682 is in the middle of what appear to be the binary contents of the\n> large media file, with pluses inserted after newline.\n> \n> Any advice on where to look or possibly how to fix this?\n> \n> I was able to work around the problem by cherry picking the change instead\n> of using rebase.  git-format-patch generates a patch that is corrupt in the\n> same way, which fails with 'git-am'.\n> \n\nDave,\n\nTelling Git that the file is binary is likely all you need to do.  Something\nlike the following line in a .gitattributes file:\n\nfilename -diff\n\nFor more info see \"man gitattributes\".\n\nHTH,\nSean\n"}]}