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

Re: Blob hash of binary files in patches generated by git format patch show in full form instead of short form

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Mar 22, 2021, 10:06 UTC
Message-ID
<a29052c9-b309-080a-537e-af6114116930@gmail.com>
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:
Show 29 quoted lines
> 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
Previous: Bagas Sanjaya
Message 4 of 4 in “Blob hash of binary files in patches generated by git format patch show in full form instead of short form”
  1. Bagas SanjayaMar 21, 2021
  2. Junio C HamanoMar 21, 2021
  3. Bagas SanjayaMar 22, 2021
  4. Bagas SanjayaMar 22, 2021

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.