(label: &str, value: &str)
| 1492 | } |
| 1493 | |
| 1494 | fn validate_hook_oid(label: &str, value: &str) -> CliResult<()> { |
| 1495 | if !matches!(value.len(), 40 | 64) || !value.bytes().all(|byte| byte.is_ascii_hexdigit()) { |
| 1496 | return Err(git_error(format!( |
| 1497 | "{label} from post-checkout is not a hexadecimal Git object ID" |
| 1498 | ))); |
| 1499 | } |
| 1500 | Ok(()) |
| 1501 | } |
| 1502 | |
| 1503 | fn append_journal_record<T: Serialize>(root: &Path, record: &T) -> CliResult<()> { |
| 1504 | let path = root.join(EVENT_JOURNAL_RELATIVE); |
no test coverage detected