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

Method restore

atomic-cli/src/commands/git/shadow.rs:537–549  ·  view source on GitHub ↗
(&self, git_repo: &GitRepository, target_ref: &str)

Source from the content-addressed store, hash-verified

535 }
536
537 fn restore(&self, git_repo: &GitRepository, target_ref: &str) -> Vec<String> {
538 let mut failures = Vec::new();
539 if let Err(error) = restore_head(git_repo, &self.head) {
540 failures.push(format!("HEAD: {error}"));
541 }
542 if let Err(error) = restore_reference(git_repo, target_ref, &self.target) {
543 failures.push(format!("{target_ref}: {error}"));
544 }
545 if let Err(error) = restore_index(git_repo, self.index.as_deref()) {
546 failures.push(format!("index: {error}"));
547 }
548 failures
549 }
550}
551
552/// Project the just-materialized Atomic view into its local Git mirror.

Callers 3

restoreFunction · 0.45
rollbackMethod · 0.45

Calls 4

restore_headFunction · 0.85
restore_referenceFunction · 0.85
restore_indexFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected