ok/jj
1
0
Fork 0
forked from mirrors/jj

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`.
This commit is contained in:
Martin von Zweigbergk 2021-01-23 22:08:13 -08:00
parent 9ffd35caf8
commit bad23cda74

View file

@ -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());
}