Function
checkpoint_branch
(old: Option<&GuardEvidence>)
Source from the content-addressed store, hash-verified
| 933 | } |
| 934 | |
| 935 | fn checkpoint_branch(old: Option<&GuardEvidence>) -> Option<String> { |
| 936 | let GuardGitEvidence::Repository(git) = &old?.git else { |
| 937 | return None; |
| 938 | }; |
| 939 | git.head |
| 940 | .symref()? |
| 941 | .strip_prefix("refs/heads/") |
| 942 | .map(str::to_string) |
| 943 | } |
| 944 | |
| 945 | fn checkpoint_oid(old: Option<&GuardEvidence>) -> Option<String> { |
| 946 | let GuardGitEvidence::Repository(git) = &old?.git else { |
Tested by
no test coverage detected