Re-observe every lease represented by this capability. This rejects an Atomic view/state change, policy change, index edit, or worktree edit.
(&self, repo: &Repository, repo_root: &Path)
| 176 | /// Re-observe every lease represented by this capability. This rejects an |
| 177 | /// Atomic view/state change, policy change, index edit, or worktree edit. |
| 178 | pub(crate) fn reobserve(&self, repo: &Repository, repo_root: &Path) -> CliResult<()> { |
| 179 | let current = verify_git_publication_mode( |
| 180 | repo, |
| 181 | repo_root, |
| 182 | &self.view, |
| 183 | self.require_index_equivalence, |
| 184 | )?; |
| 185 | if current.policy != self.policy |
| 186 | || current.atomic_state != self.atomic_state |
| 187 | || current.manifest_root != self.manifest_root |
| 188 | || current.index_root != self.index_root |
| 189 | || current.worktree_root != self.worktree_root |
| 190 | || current.git_tree != self.git_tree |
| 191 | { |
| 192 | return Err(git_error( |
| 193 | "publication state changed after equivalence verification; retry from fresh observations", |
| 194 | )); |
| 195 | } |
| 196 | Ok(()) |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | /// Verify a mandatory CB-4B publication gate for a Git-backed command. |
no test coverage detected