A recent Radicle Patch for heartwood indicates git files which are moved can have oids and file modes.
git show c55badf0b8bee38e425d297decbd3560fad3c5e7 | grep -A5 b/radicle/src/node/tracking/config.rs
diff --git a/radicle-node/src/service/tracking.rs b/radicle/src/node/tracking/config.rs
similarity index 96%
rename from radicle-node/src/service/tracking.rs
rename to radicle/src/node/tracking/config.rs
index cbc843c8..3f69208f 100644
However diff::Moved uses PathBuf as fields, where DiffFile might be better:
pub struct Moved {
/// The old path to this file, relative to the repository root.
pub old_path: PathBuf,
/// The new path to this file, relative to the repository root.
pub new_path: PathBuf,
pub diff: DiffContent,
}
Good catch. I also realised we're not serializing the diff content for compatibility reasons. I'm thinking we could serialize them only if there is a move with a change.
A recent Radicle Patch for heartwood indicates git files which are moved can have oids and file modes.
However
diff::Moved
usesPathBuf
as fields, where DiffFile might be better: