(label: &str, value: &str)
| 1523 | } |
| 1524 | |
| 1525 | fn validate_hook_oid(label: &str, value: &str) -> CliResult<()> { |
| 1526 | if !matches!(value.len(), 40 | 64) || !value.bytes().all(|byte| byte.is_ascii_hexdigit()) { |
| 1527 | return Err(git_error(format!( |
| 1528 | "{label} from post-checkout is not a hexadecimal Git object ID" |
| 1529 | ))); |
| 1530 | } |
| 1531 | Ok(()) |
| 1532 | } |
| 1533 | |
| 1534 | fn append_journal_record<T: Serialize>(root: &Path, record: &T) -> CliResult<()> { |
| 1535 | let path = root.join(EVENT_JOURNAL_RELATIVE); |
no test coverage detected