MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / get_local_view

Method get_local_view

atomic-cli/src/commands/push/command.rs:365–375  ·  view source on GitHub ↗

Get the local view name to push from. Returns the explicitly specified view or the working copy's desired view. Used by the CB-4B read-only preflight, which resolves authority from the working-copy record before writable open.

(&self, repo: &Repository)

Source from the content-addressed store, hash-verified

363 /// Used by the CB-4B read-only preflight, which resolves authority from the
364 /// working-copy record before writable open.
365 fn get_local_view(&self, repo: &Repository) -> CliResult<String> {
366 if let Some(view) = &self.from_view {
367 return Ok(view.clone());
368 }
369
370 let working_copy = repo
371 .require_working_copy_id()
372 .map_err(CliError::Repository)?;
373 repo.desired_view_name(working_copy)
374 .map_err(CliError::Repository)
375 }
376
377 /// Get the local view name from retained WorkspaceTxn authority.
378 fn get_local_view_from_txn(

Callers 1

run_asyncMethod · 0.45

Calls 3

desired_view_nameMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected