(mode: u32)
| 947 | |
| 948 | impl 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 { |
nothing calls this directly
no outgoing calls
no test coverage detected