(commit: &str)
| 16 | } |
| 17 | |
| 18 | fn short_commit(commit: &str) -> Option<&str> { |
| 19 | let commit = commit.trim(); |
| 20 | (commit.len() >= 12 && commit.len() <= 64 && commit.bytes().all(|b| b.is_ascii_hexdigit())) |
| 21 | .then(|| &commit[..12]) |
| 22 | } |
| 23 | |
| 24 | fn watch_repository(root: &Path) { |
| 25 | // --git-path resolves shared refs and worktree-local HEAD/index correctly. |