From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: "Randal L. Schwartz" <merlyn@stonehenge.com>, git@vger.kernel.org
Subject: Re: How should I handle binary file with GIT
Date: Wed, 05 Apr 2006 15:31:05 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0604051521480.2550@localhost.localdomain> (raw)
In-Reply-To: <7vslor27n4.fsf@assigned-by-dhcp.cox.net>
On Wed, 5 Apr 2006, Junio C Hamano wrote:
> If we wanted to use the patch+diff (i.e. "format-patch,
> send-email, and then am" workflow) to transfer new version of
> binary files to a recipient, which I think is useful in some
> projects, the sanest way to handle this is probably to add
> Nico's delta, going from preimage to postimage, encoded for
> safer transport, to our diff output. For safety and sanity, we
> will not "apply" the patch unless the patched file exactly
> matches the preimage that is recorded in the diff, and as long
> as the recipient has the preimage, such a patch would be able to
> reproduce the postimage and hopefully be smaller than
> transferring the whole thing.
Exactly the point.
> 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.
> Of course, to be _completely_ generic, you could include both
> compressed then uuencoded preimage and postimage, and let the
> recipient sort it out.
I think this is just too much and besides the point of a diff. If the
work flow is so convoluted such that the simple binary patch as a delta
doesn't apply then it would probably be a better idea to simply transfer
those binaries as email attachments. In other words, if a binary patch
transfer mechanism is added, it should cover the common case and leave
the rest for a better process like git-fetch/pull.
Nicolas
next prev parent reply other threads:[~2006-04-05 19:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-05 7:30 How should I handle binary file with GIT moreau francis
2006-04-05 8:14 ` Junio C Hamano
2006-04-05 12:21 ` moreau francis
2006-04-05 13:25 ` Nicolas Pitre
2006-04-05 13:35 ` moreau francis
2006-04-05 13:06 ` Nicolas Pitre
2006-04-05 13:18 ` moreau francis
2006-04-05 19:23 ` Marco Roeland
2006-04-05 15:11 ` Jakub Narebski
2006-04-05 15:32 ` Nicolas Pitre
2006-04-05 15:37 ` Randal L. Schwartz
2006-04-05 15:55 ` Shawn Pearce
2006-04-05 16:25 ` Nicolas Pitre
2006-04-05 16:21 ` Nicolas Pitre
2006-04-05 18:34 ` Junio C Hamano
2006-04-05 18:51 ` Randal L. Schwartz
2006-04-05 19:31 ` Nicolas Pitre [this message]
2006-04-05 20:20 ` Junio C Hamano
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=Pine.LNX.4.64.0604051521480.2550@localhost.localdomain \
--to=nico@cam.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=merlyn@stonehenge.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox