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

Method get_message

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

Get the message for the revised change.

(&self, original_message: &str)

Source from the content-addressed store, hash-verified

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

Calls 2

cloneMethod · 0.45