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

Method run_pop

atomic-cli/src/commands/stash.rs:535–548  ·  view source on GitHub ↗

Execute stash pop (apply and delete).

(&self, repo: &mut Repository, stash_ref: Option<&str>)

Source from the content-addressed store, hash-verified

533
534 /// Execute stash pop (apply and delete).
535 fn run_pop(&self, repo: &mut Repository, stash_ref: Option<&str>) -> CliResult<()> {
536 let stash = self.parse_stash_ref(repo, stash_ref)?;
537
538 // Apply the stash
539 self.apply_stash(repo, &stash)?;
540
541 // Delete the stash view
542 repo.delete_view(&stash.view_name)
543 .map_err(CliError::Repository)?;
544
545 print_success(&format!("Dropped {}", stash.reference()));
546
547 Ok(())
548 }
549
550 /// Execute stash apply (apply without deleting).
551 fn run_apply(&self, repo: &mut Repository, stash_ref: Option<&str>) -> CliResult<()> {

Callers 1

runMethod · 0.80

Calls 4

print_successFunction · 0.85
parse_stash_refMethod · 0.80
apply_stashMethod · 0.80
delete_viewMethod · 0.80

Tested by

no test coverage detected