radicle-dev / radicle-git

Everything Radicle growing around Git
Other
35 stars 5 forks source link

Improved `Moved` #141

Closed FintanH closed 10 months ago

FintanH commented 10 months ago

In some cases a moved file can also be modified and in these cases there will be a diff as well as new Oid's for the two sides of the diff.

Add DiffFile to the Moved type, changing the insert_moved method to accept the DiffFile's and the DiffContent.

When serializing a Moved, if the old and the new are the same then the serialization of the diff files and content are skipped -- same as the old behaviour. Otherwise, the two sides are serialized along with the content.

Fixed #140

cc @sebastinez how will this affect radicle-interface/radicle-httpd for showing diffs for moved files?

sebastinez commented 10 months ago

Thanks @FintanH for the heads up, as far as I can see we would need to adapt the radicle-interface to display the diffs for moved files that have modifications. But it wouldn't break radicle-httpd nor radicle-interface

I'll add a issue on radicle-interface to add this change to our types

FintanH commented 10 months ago

Thanks @FintanH for the heads up, as far as I can see we would need to adapt the radicle-interface to display the diffs for moved files that have modifications. But it wouldn't break radicle-httpd nor radicle-interface

I'll add a issue on radicle-interface to add this change to our types

That's great! Thanks for confirming that :)