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

Method run_pop

atomic-cli/src/commands/stash.rs:311–324  ·  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

309
310 /// Execute stash pop (apply and delete).
311 fn run_pop(&self, repo: &mut Repository, stash_ref: Option<&str>) -> CliResult<()> {
312 let stash = self.parse_stash_ref(repo, stash_ref)?;
313
314 // Apply the stash
315 self.apply_stash(repo, &stash)?;
316
317 // Delete the stash view
318 repo.delete_view(&stash.view_name)
319 .map_err(CliError::Repository)?;
320
321 print_success(&format!("Dropped {}", stash.reference()));
322
323 Ok(())
324 }
325
326 /// Execute stash apply (apply without deleting).
327 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.45
delete_viewMethod · 0.45

Tested by

no test coverage detected