Journal a shim-owned Git REWRITE execution before it becomes visible, minting the operation's immutable capture context. Only a genuine rewrite executor (one that actually ran the Git rewrite and will move the ref to the rewritten target) calls this. The minted token is the unforgeable binding between a hook capture produced during this operation's execution and the operation itself (CB-9B F2): a
(
&self,
working_copy: WorkingCopyId,
ref_name: &str,
observed_old: Option<GitRefTarget>,
intended_new: GitRefTarget,
evidence: Hash,
)
| 553 | /// [`Self::prepare_shim_git_ref_write`] carries no capture context and |
| 554 | /// can never be promoted into rewrite authority. |
| 555 | pub fn prepare_shim_git_rewrite( |
| 556 | &self, |
| 557 | working_copy: WorkingCopyId, |
| 558 | ref_name: &str, |
| 559 | observed_old: Option<GitRefTarget>, |
| 560 | intended_new: GitRefTarget, |
| 561 | evidence: Hash, |
| 562 | ) -> Result<PreparedShimGitWrite, RepositoryError> { |
| 563 | self.prepare_shim_git_write_impl( |
| 564 | true, |
| 565 | working_copy, |
| 566 | ref_name, |
| 567 | observed_old, |
| 568 | intended_new, |
| 569 | evidence, |
| 570 | Vec::new(), |
| 571 | ) |
| 572 | } |
| 573 | |
| 574 | #[allow(clippy::too_many_arguments)] |
| 575 | fn prepare_shim_git_write_impl( |