Re: PATCH 1/4] gitweb: Add GIT favicon, assuming image/png type
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Sep 4, 2006, 17:15 UTC
- Message-ID
- <Pine.LNX.4.64.0609041010540.27779@g5.osdl.org>
- In-Reply-To
- <200609041813.49103.jnareb@gmail.com>
On Mon, 4 Sep 2006, Jakub Narebski wrote:
> > This is my first post with binary patch. I'd rather not send file > git-favicon.png as an attachement due to filtering.
You forgot the "--binary" flag, so it didn't actually create a binary patch, it just did the "Binary files .. differ" thing:
> diff --git a/gitweb/git-favicon.png b/gitweb/git-favicon.png > new file mode 100644 > index 0000000..de637c0 > Binary files /dev/null and b/gitweb/git-favicon.png differ
See diff.c: builtin_diff() for the logic:
...
if (o->binary)
emit_binary_diff(&mf1, &mf2);
else
printf("Binary files %s and %s differ\n",
lbl[0], lbl[1]);
...ie the default is to act like a regular "diff", and we do the extended git binary diffs only if you ask for them explicitly.
(Of course, since we do the _other_ extended git diff headers regardless, maybe that doesn't make much sense. On the other hand, the normal extended git diff headers are compatible with normal patches, so there is a real difference, and so arguably the "--binary" flag makes tons of sense).
Linus