Skip to content

Commit

Permalink
git: Rename FileDiff tag from state to status
Browse files Browse the repository at this point in the history
To be more consistent in the use between state and status on
radicle-interface.
  • Loading branch information
sebastinez committed Apr 25, 2024
1 parent d71b65a commit 1525ef6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion radicle-surf/src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
12 changes: 6 additions & 6 deletions radicle-surf/t/src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fn test_diff_serde() -> Result<(), Error> {
"mode": "blob",
"oid": "02f70f56ec62396ceaf38804c37e169e875ab291",
},
"state": "added"
"status": "added"
},
{
"path": "README.md",
Expand Down Expand Up @@ -291,7 +291,7 @@ fn test_diff_serde() -> Result<(), Error> {
"mode": "blob",
"oid": "5e07534cd74a6a9b2ccd2729b181c4ef26173a5e",
},
"state": "modified",
"status": "modified",
},
{
"current": {
Expand All @@ -300,7 +300,7 @@ fn test_diff_serde() -> Result<(), Error> {
},
"oldPath": "text/emoji.txt",
"newPath": "emoji.txt",
"state": "moved"
"status": "moved"
},
{
"current": {
Expand All @@ -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",
Expand Down Expand Up @@ -573,7 +573,7 @@ index 3f69208f3..cbc843c82 100644
"oid": "3f69208f30000000000000000000000000000000",
},
"oldPath": "radicle/src/node/tracking/config.rs",
"state": "moved"
"status": "moved"
},
],
"stats": {
Expand Down

0 comments on commit 1525ef6

Please sign in to comment.