From 1525ef65f13bd67a78653740f848bd1f7ed06eee Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Fri, 19 Apr 2024 15:02:54 +0200 Subject: [PATCH] git: Rename FileDiff tag from state to status To be more consistent in the use between state and status on radicle-interface. --- radicle-surf/src/diff.rs | 2 +- radicle-surf/t/src/diff.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/radicle-surf/src/diff.rs b/radicle-surf/src/diff.rs index 7d5f23e..0ecf656 100644 --- a/radicle-surf/src/diff.rs +++ b/radicle-surf/src/diff.rs @@ -377,7 +377,7 @@ pub struct DiffFile { #[cfg_attr( feature = "serde", derive(Serialize), - serde(tag = "state", rename_all = "camelCase") + serde(tag = "status", rename_all = "camelCase") )] pub enum FileDiff { Added(Added), diff --git a/radicle-surf/t/src/diff.rs b/radicle-surf/t/src/diff.rs index 1c446ab..b064c27 100644 --- a/radicle-surf/t/src/diff.rs +++ b/radicle-surf/t/src/diff.rs @@ -248,7 +248,7 @@ fn test_diff_serde() -> Result<(), Error> { "mode": "blob", "oid": "02f70f56ec62396ceaf38804c37e169e875ab291", }, - "state": "added" + "status": "added" }, { "path": "README.md", @@ -291,7 +291,7 @@ fn test_diff_serde() -> Result<(), Error> { "mode": "blob", "oid": "5e07534cd74a6a9b2ccd2729b181c4ef26173a5e", }, - "state": "modified", + "status": "modified", }, { "current": { @@ -300,7 +300,7 @@ fn test_diff_serde() -> Result<(), Error> { }, "oldPath": "text/emoji.txt", "newPath": "emoji.txt", - "state": "moved" + "status": "moved" }, { "current": { @@ -309,11 +309,11 @@ fn test_diff_serde() -> Result<(), Error> { }, "newPath": "file_operations/copied.md", "oldPath": "README.md", - "state": "copied" + "status": "copied" }, { "path": "text/arrows.txt", - "state": "deleted", + "status": "deleted", "old": { "mode": "blob", "oid": "95418c04010a3cc758fb3a37f9918465f147566f", @@ -573,7 +573,7 @@ index 3f69208f3..cbc843c82 100644 "oid": "3f69208f30000000000000000000000000000000", }, "oldPath": "radicle/src/node/tracking/config.rs", - "state": "moved" + "status": "moved" }, ], "stats": {