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

Method from

atomic-cli/src/commands/diff/types.rs:719–733  ·  view source on GitHub ↗
(status: FileStatus)

Source from the content-addressed store, hash-verified

717
718impl From<FileStatus> for FileChangeStatus {
719 fn from(status: FileStatus) -> Self {
720 match status {
721 FileStatus::Added => FileChangeStatus::Added,
722 FileStatus::Deleted => FileChangeStatus::Deleted,
723 FileStatus::Modified => FileChangeStatus::Modified,
724 FileStatus::TypeChanged => FileChangeStatus::TypeChanged,
725 FileStatus::Clean => FileChangeStatus::Modified, // Shouldn't happen
726 FileStatus::Untracked => FileChangeStatus::Untracked,
727 // The diff reads a pending untrack as the deletion the next
728 // record lands, matching the repository-level mapping.
729 FileStatus::PendingUntrack => FileChangeStatus::Deleted,
730 FileStatus::Conflicted => FileChangeStatus::Modified,
731 FileStatus::PermissionsChanged => FileChangeStatus::Modified,
732 }
733 }
734}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected