git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Blob hash of binary files in patches generated by git format patch show in full form instead of short form
Date: Mon, 22 Mar 2021 17:06:35 +0700	[thread overview]
Message-ID: <a29052c9-b309-080a-537e-af6114116930@gmail.com> (raw)
In-Reply-To: <56cde808-95c3-2e22-2dab-880061d51473@gmail.com>

Oh oh oh, I see git diff format for generating patches in documentation for
git diff-files.

On 22/03/21 12.47, Bagas Sanjaya wrote:
> On 22/03/21 00.31, Junio C Hamano wrote:
>> Bagas Sanjaya <bagasdotme@gmail.com> writes:
>>
>>> What's different between what you expected and what actually happened?
>>>
>>> Blob hash for binary files are shown in full form, as opposed to blob hash
>>> for text files.
>>
>> This is working as intended, designed and implemented.
>>
>> The textual patch is meant to be applicable on target text that may
>> even have been slightly modified from the original from which the
>> patch was taken, and the abbreviated object name on the "index" line
>> is there mostly for human's sanity check and as a visual aid.
>> Ordinarily it is not used to actually find the matching blob object
>> (and it is not an error if there is no matching blob object in the
>> repository that a patch application is attempted in).
>>
>> But the binary patch is designed to be applicable only to an exact
>> copy of the original and nowhere else.  The object name is given in
>> full, instead of using abbreviated form, to ensure that we do not
>> try to apply a binary patch to an object whose name is "similar".
>>
>> Thanks.
>>
> 
> Hmm... but I don't see that in the documentation for git format-patch.
> Maybe I need to send doc update.
> 

-- 
An old man doll... just what I always wanted! - Clara

      reply	other threads:[~2021-03-22 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-21 13:05 Blob hash of binary files in patches generated by git format patch show in full form instead of short form Bagas Sanjaya
2021-03-21 17:31 ` Junio C Hamano
2021-03-22  5:47   ` Bagas Sanjaya
2021-03-22 10:06     ` Bagas Sanjaya [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=a29052c9-b309-080a-537e-af6114116930@gmail.com \
    --to=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).