Git development
 help / color / mirror / Atom feed
From: Thorsten Otto <admin@tho-otto.de>
To: Kristoffer Haugsbakk <code@khaugsbakk.name>
Cc: git@vger.kernel.org
Subject: Re: "git diff" does not show a diff for newly added, binary files
Date: Tue, 04 Apr 2023 12:39:09 +0200	[thread overview]
Message-ID: <2349908.kWcu0K8Tai@earendil> (raw)
In-Reply-To: <8135fc7b-1953-4702-a9c4-b0f847e69887@app.fastmail.com>

On Dienstag, 4. April 2023 12:17:43 CEST Kristoffer Haugsbakk wrote:

> Do you use `.gitattributes` to get these binary diffs? What does it look
> like?

No, the repo was just created for demonstrating purposes. But when i commit 
that last change, then do a "git --format-patch -1", i get something like

diff --git a/b b/b
new file mode 100644
index 
0000000000000000000000000000000000000000..a64a5a93fb4aef4d5f63d79cb2582731b9ac5063
GIT binary patch
literal 512
NcmZQz7zHCa1ONg600961

literal 0
HcmV?d00001


I would expect "git diff" to output the same information. I don't see a reason 
why it outputs the diff for a new text file, but not for a binary file?






  reply	other threads:[~2023-04-04 10:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04  9:58 "git diff" does not show a diff for newly added, binary files Thorsten Otto
2023-04-04 10:17 ` Kristoffer Haugsbakk
2023-04-04 10:39   ` Thorsten Otto [this message]
2023-04-04 10:45     ` Kristoffer Haugsbakk
2023-04-04 11:23       ` Thorsten Otto
2023-04-04 11:29         ` Kristoffer Haugsbakk
2023-04-04 15:36     ` Jeff King
2023-04-04 15:42   ` Junio C Hamano
2023-04-04 15:37 ` Junio C Hamano
2023-04-04 15:39 ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2349908.kWcu0K8Tai@earendil \
    --to=admin@tho-otto.de \
    --cc=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox