| 124 | |
| 125 | impl ShimCheckpoint { |
| 126 | pub(crate) fn legacy_compatible( |
| 127 | view: impl Into<String>, |
| 128 | atomic_state: impl Into<String>, |
| 129 | git_head: impl Into<String>, |
| 130 | git_tree: impl Into<String>, |
| 131 | ) -> Self { |
| 132 | let view = view.into(); |
| 133 | let git_tree = git_tree.into(); |
| 134 | Self { |
| 135 | version: CHECKPOINT_VERSION, |
| 136 | git_head_symref: Some(format!("refs/heads/{view}")), |
| 137 | view, |
| 138 | atomic_state: atomic_state.into(), |
| 139 | atomic_manifest_root: None, |
| 140 | git_head: git_head.into(), |
| 141 | git_manifest_root: Some(ManifestRootEvidence::git_tree(git_tree.clone())), |
| 142 | git_index_tree: Some(git_tree.clone()), |
| 143 | git_tree, |
| 144 | git_index_digest: None, |
| 145 | git_refs_digest: None, |
| 146 | git_admin: None, |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | /// State already verified by the shim before a checkpoint is published. |