From bad23cda74cdb8f43f9da7e4080fbb706b9f9209 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sat, 23 Jan 2021 22:08:13 -0800 Subject: [PATCH] describe: rename --text argument to more standard --message I'm about to add the argument to `jj merge` and `jj close` as well. For those, I think `--description` would have made more sense than `--text`, but I don't like the idea of having the short form be `-d` (sounds too much like `--destination` or `--delete`). It's unfortunate that `jj describe` set the "commit description" but the argument is called "message". That still seems better than calling the command `jj message`. --- src/commands.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index 1af68aa1b..d99197a58 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -335,7 +335,12 @@ fn get_app<'a, 'b>() -> App<'a, 'b> { let describe_command = SubCommand::with_name("describe") .about("edit the commit description") .arg(rev_arg()) - .arg(Arg::with_name("text").long("text").takes_value(true)) + .arg( + Arg::with_name("message") + .long("message") + .short("m") + .takes_value(true), + ) .arg(Arg::with_name("stdin").long("stdin")); let close_command = SubCommand::with_name("close") .about("mark a commit closed, making new work go into a new commit") @@ -1188,8 +1193,8 @@ fn cmd_describe( let mut buffer = String::new(); io::stdin().read_to_string(&mut buffer).unwrap(); description = buffer; - } else if sub_matches.is_present("text") { - description = sub_matches.value_of("text").unwrap().to_owned() + } else if sub_matches.is_present("message") { + description = sub_matches.value_of("message").unwrap().to_owned() } else { description = edit_description(&repo, commit.description()); }