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

Method get_message

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

Get the message for the revised change.

(&self, original_message: &str)

Source from the content-addressed store, hash-verified

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

Calls 2

cloneMethod · 0.45