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

Method get_message

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

Get the message for the revised change.

(&self, original_message: &str)

Source from the content-addressed store, hash-verified

359
360 /// Get the message for the revised change.
361 fn get_message(&self, original_message: &str) -> CliResult<String> {
362 // If explicit message provided, use it
363 if let Some(ref msg) = self.message {
364 return Ok(msg.clone());
365 }
366
367 // If reword mode and not no-edit, open editor
368 if self.reword && !self.no_edit {
369 return self.get_message_from_editor(original_message);
370 }
371
372 // Otherwise use original message
373 Ok(original_message.to_string())
374 }
375
376 /// Open an editor for the user to edit the message.
377 fn get_message_from_editor(&self, original_message: &str) -> CliResult<String> {

Calls 2

cloneMethod · 0.45