Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: Re: reversible binary diff
Date: Fri, 25 Aug 2006 19:14:37 -0700	[thread overview]
Message-ID: <7vr6z4450y.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0608252050140.3683@localhost.localdomain> (Nicolas Pitre's message of "Fri, 25 Aug 2006 21:04:46 -0400 (EDT)")

Nicolas Pitre <nico@cam.org> writes:

> I just noticed that the binary diff format was augmented in order to 
> carry the reverse diff information.
>
> Why was this needed?
>
> I mean, if you want to reverse a binary diff you only need to retrieve 
> the original blob the forward diff was meant to apply against, and it is 
> certainly already available in the object store if the forward diff has 
> been previously applied.  Or has this assumption been wrong for some 
> work flow?

It's been wrong all along, but I do not think it practically
matters because I haven't seen anybody exchange binary diffs
back and forth.

As long as you use patch to switch between states inside the
repository the patch originates from, it is not needed.  The
change is just there for completeness.

But if you are sending a patch to somebody else, you would need
the reverse information.  t/t4116 test needs to be updated to
use separate repository that has only preimage and apply a patch
in reverse there to validate the correct operation.  The log
message for the commit that introduced the test mentions it, but
nobody noticed and took hint ;-).

      reply	other threads:[~2006-08-26  2:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-26  1:04 reversible binary diff Nicolas Pitre
2006-08-26  2:14 ` Junio C Hamano [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

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

  git send-email \
    --in-reply-to=7vr6z4450y.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    /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