Thread (1 message) 1 message, 1 author, 2016-06-15

Re: reversible binary diff

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:38

Nicolas Pitre [off-list ref] 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 ;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help