Re: reversible binary diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nicolas Pitre <nico@xxxxxxx> 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 ;-).




-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]