git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why is there a --binary option needed for git-apply?
@ 2006-09-05 18:40 Carl Worth
  2006-09-06  3:38 ` Shawn Pearce
  2006-09-07  6:45 ` Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: Carl Worth @ 2006-09-05 18:40 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

I was recently emailed a patch that introduced some new binary files
to my repository. The patch included a very pleasant-looking chunk
along the lines of:

	diff --git a/new/file.png b/new/file.png
	new file mode 100644
	index 0000000000000000000000000000000000000000..e7edd8141e15f5753ea94244e7315bd1341a8c05
	GIT binary patch

I tried applying the patch with git-apply (1.4.2.rc2.gef1d9) and
received an inscrutable error:

	fatal: patch with only garbage at line 90

Where line 90 happened to be the line after the first chunk.

I was disappointed that the operation had failed and started guessing
at problem causes (git version incompatibilities? MUA whitespace
munging?).

Shawn Pearce was kind enough to direct me to the --binary option for
git-apply which solved my problem. But that left me wondering why
git-apply requires this extra command-line option to do its
job. Shouldn't git-apply simply apply the patch it is given?

If there is some reason for git-apply to only apply binary patches
when under the duress of --binary, then at the very least it could use
a better error message explaining the situation.

-Carl
--
cworth@redhat.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-07  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-05 18:40 Why is there a --binary option needed for git-apply? Carl Worth
2006-09-06  3:38 ` Shawn Pearce
2006-09-07  6:45 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).