git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jakub NarebskiNext: Jakub Narebski
Message 3 of 14 in “gitweb: Some improvements”
  1. 0/4 gitweb: Some improvementsJakub Narebski, Sep 4, 2006
  2. PATCH 1/4] gitweb: Add GIT favicon, assuming image/png typeJakub Narebski, Sep 4, 2006
  3. Linus TorvaldsSep 4, 2006
  4. 1/4 gitweb: Add GIT favicon, assuming image/png typeJakub Narebski, Sep 4, 2006
  5. Jakub NarebskiSep 4, 2006
  6. Junio C HamanoSep 4, 2006
  7. Jakub NarebskiSep 4, 2006
  8. Junio C HamanoSep 4, 2006
  9. 2/4 gitweb: Change the name of diff to parent link in "commit" view to "diff"Jakub Narebski, Sep 4, 2006
  10. 3/4 gitweb: Divide page path into directories -- path's "breadcrumbs"Jakub Narebski, Sep 4, 2006
  11. 4/4 gitweb: Correct typo: '==' instead of 'eq' in git_difftree_bodyJakub Narebski, Sep 4, 2006
  12. Junio C HamanoSep 4, 2006
  13. Jakub NarebskiSep 4, 2006
  14. Jakub NarebskiSep 5, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.