Fetch-only half of [`reconcile_after_fetch`], for transports that must keep repository writes off the async context (the daemon runs them inside `spawn_blocking`). `None` = nothing to adopt.
(
remote: &HttpRemote,
)
| 96 | /// repository writes off the async context (the daemon runs them inside |
| 97 | /// `spawn_blocking`). `None` = nothing to adopt. |
| 98 | pub async fn fetch_identity( |
| 99 | remote: &HttpRemote, |
| 100 | ) -> Result<Option<serde_json::Value>, RepositoryError> { |
| 101 | let fetched = match remote.fetch_project_identity().await { |
| 102 | Ok(fetched) => fetched, |
| 103 | // Transport trouble is not a fetch failure: identity adoption is |
| 104 | // additive and must never fail the pull that just succeeded. |
| 105 | Err(error) => { |
| 106 | tracing::info!("project-identity fetch skipped: {error}"); |
| 107 | return Ok(None); |
| 108 | } |
| 109 | }; |
| 110 | match fetched { |
| 111 | IdentityFetch::Bound(document) => Ok(Some(document)), |
| 112 | IdentityFetch::Unbound | IdentityFetch::Unsupported => Ok(None), |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | /// Repo-write half of [`reconcile_after_fetch`]: apply a fetched identity |
| 117 | /// document to the local repository. Skip entirely when nothing was fetched. |
no test coverage detected