(head: &GitHeadObservation)
| 1089 | } |
| 1090 | |
| 1091 | fn head_oid(head: &GitHeadObservation) -> Option<&str> { |
| 1092 | match head { |
| 1093 | GitHeadObservation::Attached { oid, .. } | GitHeadObservation::Detached { oid } => { |
| 1094 | Some(oid) |
| 1095 | } |
| 1096 | GitHeadObservation::Unborn { .. } | GitHeadObservation::MissingTarget { .. } => None, |
| 1097 | } |
| 1098 | } |
| 1099 | |
| 1100 | fn observe_metadata_path(path: PathBuf) -> Result<GitAdminPathObservation, ObservationError> { |
| 1101 | let kind = match fs::symlink_metadata(&path) { |
no outgoing calls
no test coverage detected