diff --git a/Cargo.lock b/Cargo.lock index dc9571d1..efa8984b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2590,9 +2590,9 @@ checksum = "db20136bbc9ae63f3fec8e5a6c369f4902fac2244501b5dfc6d668e43475aaa4" [[package]] name = "radicle-surf" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fade014fab67a7bdb816e4cf821611af5f0bc55c6eb1018561027ba6ba3b6b28" +checksum = "5fae23233ff8be809a822d923e93e56e5282179039b19f345f39f592c1ca0765" dependencies = [ "anyhow", "base64 0.13.1", diff --git a/radicle-cli/Cargo.toml b/radicle-cli/Cargo.toml index bea6b35b..1a94617e 100644 --- a/radicle-cli/Cargo.toml +++ b/radicle-cli/Cargo.toml @@ -23,7 +23,7 @@ nonempty = { version = "0.9.0" } # N.b. this is required to use macros, even though it's re-exported # through radicle radicle-git-ext = { version = "0.7.0", features = ["serde"] } -radicle-surf = { version = "0.19.0" } +radicle-surf = { version = "0.21.0" } serde = { version = "1.0" } serde_json = { version = "1" } shlex = { version = "1.1.0" } diff --git a/radicle-httpd/Cargo.toml b/radicle-httpd/Cargo.toml index 05ce9b66..8c92063d 100644 --- a/radicle-httpd/Cargo.toml +++ b/radicle-httpd/Cargo.toml @@ -37,7 +37,7 @@ hyper = { version = "1.0.1", default-features = false } lexopt = { version = "0.3.0" } lru = { version = "0.12.0" } nonempty = { version = "0.9.0", features = ["serialize"] } -radicle-surf = { version = "0.19.0", default-features = false, features = ["serde"] } +radicle-surf = { version = "0.21.0", default-features = false, features = ["serde"] } serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["preserve_order"] } thiserror = { version = "1" } diff --git a/radicle-httpd/src/api/v1/projects.rs b/radicle-httpd/src/api/v1/projects.rs index 49dd197a..d3e97908 100644 --- a/radicle-httpd/src/api/v1/projects.rs +++ b/radicle-httpd/src/api/v1/projects.rs @@ -1190,8 +1190,45 @@ mod routes { }, }, "diff": { - "added": [ + "files": [ { + "state": "deleted", + "path": "CONTRIBUTING", + "diff": { + "type": "plain", + "hunks": [ + { + "header": "@@ -1 +0,0 @@\n", + "lines": [ + { + "line": "Thank you very much!\n", + "lineNo": 1, + "type": "deletion", + }, + ], + "old": { + "start": 1, + "end": 2, + }, + "new": { + "start": 0, + "end": 0, + }, + }, + ], + "stats": { + "additions": 0, + "deletions": 1, + }, + "eof": "noneMissing", + }, + "old": { + "oid": "82eb77880c693655bce074e3dbbd9fa711dc018b", + "mode": "blob", + }, + }, + { + "state": "added", "path": "README", "diff": { "type": "plain", @@ -1227,6 +1264,7 @@ mod routes { }, }, { + "state": "added", "path": "dir1/README", "diff": { "type": "plain", @@ -1260,48 +1298,8 @@ mod routes { "oid": "1dd5654ca2d2cf9f33b14c92b5ca9e1d21a91ae1", "mode": "blob", }, - } - ], - "deleted": [ - { - "path": "CONTRIBUTING", - "diff": { - "type": "plain", - "hunks": [ - { - "header": "@@ -1 +0,0 @@\n", - "lines": [ - { - "line": "Thank you very much!\n", - "lineNo": 1, - "type": "deletion", - }, - ], - "old": { - "start": 1, - "end": 2, - }, - "new": { - "start": 0, - "end": 0, - }, - }, - ], - "stats": { - "additions": 0, - "deletions": 1, - }, - "eof": "noneMissing", - }, - "old": { - "oid": "82eb77880c693655bce074e3dbbd9fa711dc018b", - "mode": "blob", - }, }, ], - "moved": [], - "copied": [], - "modified": [], "stats": { "filesChanged": 3, "insertions": 2, @@ -1604,8 +1602,9 @@ mod routes { response.json().await, json!({ "diff": { - "added": [ + "files": [ { + "state": "added", "path": "dir1/README", "diff": { "type": "plain", @@ -1641,10 +1640,6 @@ mod routes { }, }, ], - "deleted": [], - "moved": [], - "copied": [], - "modified": [], "stats": { "filesChanged": 1, "insertions": 1,