(status: FileStatus)
| 729 | |
| 730 | impl From<FileStatus> for FileChangeStatus { |
| 731 | fn from(status: FileStatus) -> Self { |
| 732 | match status { |
| 733 | crate::status::FileStatus::Added => FileChangeStatus::Added, |
| 734 | crate::status::FileStatus::Deleted => FileChangeStatus::Deleted, |
| 735 | crate::status::FileStatus::Modified => FileChangeStatus::Modified, |
| 736 | crate::status::FileStatus::TypeChanged => FileChangeStatus::TypeChanged, |
| 737 | crate::status::FileStatus::Clean => FileChangeStatus::Modified, // Shouldn't happen |
| 738 | crate::status::FileStatus::Untracked => FileChangeStatus::Untracked, |
| 739 | // A pending untrack is a deletion the next record lands; the diff |
| 740 | // reads as the deletion it will become, not as unchanged content. |
| 741 | crate::status::FileStatus::PendingUntrack => FileChangeStatus::Deleted, |
| 742 | crate::status::FileStatus::Conflicted => FileChangeStatus::Modified, |
| 743 | crate::status::FileStatus::PermissionsChanged => FileChangeStatus::Modified, |
| 744 | } |
| 745 | } |
| 746 | } |
| 747 | |
| 748 | #[derive(Debug, Deserialize)] |
nothing calls this directly
no outgoing calls
no test coverage detected