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

Re: How should I handle binary file with GIT

From
Junio C Hamano <junkio@cox.net>
Date
Apr 5, 2006, 20:20 UTC
Message-ID
<7vy7yjzsdp.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0604051521480.2550@localhost.localdomain>
Nicolas Pitre <nico@cam.org> writes:
Show 13 quoted lines
> On Wed, 5 Apr 2006, Junio C Hamano wrote:
>
>> We've been trying to keep our diff output reversible (e.g. we
>> show what the filemode of the preimage is), so if we take the
>> above route, it probably should record deltas for both going
>> from preimage to postimage _and_ going the other way (unless
>> xdelta can be applied in-reverse, which I do not think is the
>> case).
>
> You cannot reverse a delta.  However if you were able to apply a delta 
> from preimage to postimage that means you must already have had preimage 
> in your object store.  Therefore reverting such a patch would simply 
> involve restoring preimage.

The case I had in mind was where you shipped a tarball of the tip to somebody (or "a shallow clone"), and after seeing him having problems with that release, sending him a patch telling him "reverting this might help, could you please give it a try?"

Of course you could be nicer to him and generate the reverse diff on your end in such a case instead.

Previous: Nicolas Pitre
Message 18 of 18 in “How should I handle binary file with GIT”
  1. moreau francisApr 5, 2006
  2. Junio C HamanoApr 5, 2006
  3. moreau francisApr 5, 2006
  4. Nicolas PitreApr 5, 2006
  5. moreau francisApr 5, 2006
  6. Nicolas PitreApr 5, 2006
  7. moreau francisApr 5, 2006
  8. Marco RoelandApr 5, 2006
  9. Jakub NarebskiApr 5, 2006
  10. Nicolas PitreApr 5, 2006
  11. Randal L. SchwartzApr 5, 2006
  12. Shawn PearceApr 5, 2006
  13. Nicolas PitreApr 5, 2006
  14. Nicolas PitreApr 5, 2006
  15. Junio C HamanoApr 5, 2006
  16. Randal L. SchwartzApr 5, 2006
  17. Nicolas PitreApr 5, 2006
  18. Junio C HamanoApr 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.