MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / from

Method from

atomic-repository/src/diff_engine.rs:731–745  ·  view source on GitHub ↗
(status: FileStatus)

Source from the content-addressed store, hash-verified

729
730impl 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)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected