Record the vault projection policy (RFC §6.2) for a freshly imported repository. `tracked` is the policy resolved BEFORE the repository (and its default configuration) was created — the same unambiguous HEAD-tree detection the import plan above just used. `git import` is the first command that needs the decision, so it persists the detected value once, here, and every later command reconstructs t
(repo: &Repository, tracked: bool)
| 1708 | /// every later command reconstructs this exact conversion policy from the |
| 1709 | /// record instead of re-detecting against a moving HEAD. |
| 1710 | pub(crate) fn record_imported_vault_policy(repo: &Repository, tracked: bool) -> CliResult<()> { |
| 1711 | if tracked { |
| 1712 | repo.set_shim_vault_policy(atomic_config::ShimVaultPolicy::Tracked, None) |
| 1713 | .map_err(CliError::from)?; |
| 1714 | print_info( |
| 1715 | "Git tracks .vault/: recorded shim vault policy 'tracked' — the vault joins \ |
| 1716 | the manifest projection exactly like any other tracked path.", |
| 1717 | ); |
| 1718 | } |
| 1719 | Ok(()) |
| 1720 | } |
| 1721 | |
| 1722 | pub(crate) fn git_object_id(algorithm: GitHashAlgorithm, oid: Oid) -> CliResult<GitObjectId> { |
| 1723 | GitObjectId::new(algorithm, oid.as_bytes().to_vec()).map_err(|error| { |
no test coverage detected