Get the message for the revised change.
(&self, original_message: &str)
| 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> { |