From 154566f8ef3e6cfca6265f2e645e507c5f0abefc Mon Sep 17 00:00:00 2001 From: cloudhead Date: Wed, 27 Sep 2023 15:54:16 +0200 Subject: [PATCH] cli: Update to `radicle-surf` 0.16 --- Cargo.lock | 4 ++-- radicle-cli/Cargo.toml | 2 +- radicle-cli/src/commands/diff.rs | 1 - radicle-cli/src/git/pretty_diff.rs | 8 ++++---- radicle-httpd/Cargo.toml | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index edc108dcd..fb4c7681a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2031,9 +2031,9 @@ checksum = "db20136bbc9ae63f3fec8e5a6c369f4902fac2244501b5dfc6d668e43475aaa4" [[package]] name = "radicle-surf" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1881748cd481ba4680c0ed50fd34abe59d282059be10c277400607e68aa3c827" +checksum = "bfc319f555a7cbf938ba4eecb06bd6edcdccce339b20a6b8d8a3af3e92e9f7b7" dependencies = [ "anyhow", "base64 0.13.1", diff --git a/radicle-cli/Cargo.toml b/radicle-cli/Cargo.toml index b00b16b6f..6058bc3dc 100644 --- a/radicle-cli/Cargo.toml +++ b/radicle-cli/Cargo.toml @@ -22,7 +22,7 @@ nonempty = { version = "0.8" } # N.b. this is required to use macros, even though it's re-exported # through radicle radicle-git-ext = { version = "0.6.0", features = ["serde"] } -radicle-surf = { version = "0.15.0" } +radicle-surf = { version = "0.16.0" } serde = { version = "1.0" } serde_json = { version = "1" } serde_yaml = { version = "0.8" } diff --git a/radicle-cli/src/commands/diff.rs b/radicle-cli/src/commands/diff.rs index f020ebc2c..142de8f59 100644 --- a/radicle-cli/src/commands/diff.rs +++ b/radicle-cli/src/commands/diff.rs @@ -104,7 +104,6 @@ pub fn run(options: Options, _ctx: impl term::Context) -> anyhow::Result<()> { let mut find_opts = git::raw::DiffFindOptions::new(); find_opts.exact_match_only(true); find_opts.all(true); - find_opts.copies(false); // We don't support finding copies at the moment. let mut diff = match oids.as_slice() { [] => { diff --git a/radicle-cli/src/git/pretty_diff.rs b/radicle-cli/src/git/pretty_diff.rs index 56345a990..82f04ec1a 100644 --- a/radicle-cli/src/git/pretty_diff.rs +++ b/radicle-cli/src/git/pretty_diff.rs @@ -160,10 +160,10 @@ impl ToPretty for DiffContent { Some((f.old.oid, f.path.clone())), Some((f.new.oid, f.path.clone())), ), - FileDiff::Copied(_) => { - // This is due to not having `oid`s for copied files yet. - unimplemented!("DiffContent::pretty: copied files are not supported in diffs") - } + FileDiff::Copied(f) => ( + Some((f.old.oid, f.old_path.clone())), + Some((f.old.oid, f.new_path.clone())), + ), }; let mut header = header.pretty(hi, &(), repo); diff --git a/radicle-httpd/Cargo.toml b/radicle-httpd/Cargo.toml index 762670e8c..72786e66f 100644 --- a/radicle-httpd/Cargo.toml +++ b/radicle-httpd/Cargo.toml @@ -27,7 +27,7 @@ hyper = { version = "0.14.17", default-features = false } lexopt = { version = "0.2.1" } lru = { version = "0.11.0" } nonempty = { version = "0.8.1", features = ["serialize"] } -radicle-surf = { version = "0.15.0", default-features = false, features = ["serde"] } +radicle-surf = { version = "0.16.0", default-features = false, features = ["serde"] } serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["preserve_order"] } thiserror = { version = "1" }