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

Method from_index_mode

atomic-cli/src/commands/git/observation.rs:949–958  ·  view source on GitHub ↗
(mode: u32)

Source from the content-addressed store, hash-verified

947
948impl CanonicalTreeMode {
949 fn from_index_mode(mode: u32) -> Option<Self> {
950 match mode & 0o170000 {
951 0o040000 => Some(Self::Tree),
952 0o100000 if mode & 0o111 == 0 => Some(Self::Regular),
953 0o100000 => Some(Self::Executable),
954 0o120000 => Some(Self::Symlink),
955 0o160000 => Some(Self::Gitlink),
956 _ => None,
957 }
958 }
959
960 fn encoded(self) -> &'static [u8] {
961 match self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected