* reversible binary diff
@ 2006-08-26 1:04 Nicolas Pitre
2006-08-26 2:14 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Pitre @ 2006-08-26 1:04 UTC (permalink / raw)
To: git
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?
Nicolas
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: reversible binary diff
2006-08-26 1:04 reversible binary diff Nicolas Pitre
@ 2006-08-26 2:14 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2006-08-26 2:14 UTC (permalink / raw)
To: git
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 ;-).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-26 2:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-26 1:04 reversible binary diff Nicolas Pitre
2006-08-26 2:14 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox