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

Method execute_revise

atomic-cli/src/commands/revise.rs:529–549  ·  view source on GitHub ↗

Compose the interactive message before entering the shared domain flow.

(&self, repo: &mut Repository, entry: &HistoryEntry)

Source from the content-addressed store, hash-verified

527
528 /// Compose the interactive message before entering the shared domain flow.
529 fn execute_revise(&self, repo: &mut Repository, entry: &HistoryEntry) -> CliResult<Hash> {
530 let original = repo
531 .load_change(&entry.hash)
532 .map_err(CliError::Repository)?;
533 let message = self.get_message(&original.hashed.header.message)?;
534 let author = self
535 .parse_author()
536 .map(|(name, email)| atomic_core::change::Author {
537 name,
538 email,
539 identity: None,
540 });
541 let paths = self
542 .files
543 .iter()
544 .map(|path| path.to_string_lossy().into_owned())
545 .collect();
546 repo.revise_content(&entry.hash, &message, author, paths)
547 .map(|outcome| outcome.new_hash)
548 .map_err(CliError::Repository)
549 }
550}
551
552impl Default for Revise {

Callers 1

runMethod · 0.80

Calls 6

revise_contentMethod · 0.80
load_changeMethod · 0.45
get_messageMethod · 0.45
parse_authorMethod · 0.45
collectMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected