Re: [PATCH 3/4] diff: introduce diff.<driver>.binary
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Oct 13, 2008, 06:10 UTC
- Message-ID
- <48F2E65E.50506@viscovery.net>
- In-Reply-To
- <20081013041525.GA32629@coredump.intra.peff.net>
Jeff King schrieb:
Show 18 quoted lines
> On Sun, Oct 12, 2008 at 09:00:50PM -0700, Junio C Hamano wrote: >> - You teach git-apply to use a reverse transformation of textconv, so >> that it does, upon reception of a textconv diff: >> >> (1) pass existing preimage through textconv; >> (2) apply the patch; >> (3) convert the result back to binary. > > The problem with this approach is that it requires that the textconv be > a reversible mapping. And the two motivating examples (dumping exif tags > and converting word processor documents to text) are not; they are lossy > conversions. > > It's possible that one could, given the binary preimage and the two > lossy textconv'd versions, produce a custom binary merge that would just > munge the tags, or just munge the text, or whatever. But that is an > order of magnitude more work than writing a textconv, which is usually > as simple as "/path/to/existing/conversion-script".
I fully agree with you. .texconv should only be used for human consumption. We already have a reversible binary<->text conversion: the binary diffs.
-- Hannes