builtin-notes: Add --message/--file aliases for -m/-F options

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johan Herland 2010-02-13 22:28:31 +01:00 committed by Junio C Hamano
parent e397421abf
commit ba20f15e0a
2 changed files with 4 additions and 2 deletions

View File

@ -58,11 +58,13 @@ prune::
OPTIONS
-------
-m <msg>::
--message=<msg>::
Use the given note message (instead of prompting).
If multiple `-m` options are given, their values
are concatenated as separate paragraphs.
-F <file>::
--file=<file>::
Take the note message from the given file. Use '-' to
read the note message from the standard input.

View File

@ -217,9 +217,9 @@ int cmd_notes(int argc, const char **argv, const char *prefix)
struct msg_arg msg = { 0, STRBUF_INIT };
struct option options[] = {
OPT_GROUP("Notes edit options"),
OPT_CALLBACK('m', NULL, &msg, "msg",
OPT_CALLBACK('m', "message", &msg, "msg",
"note contents as a string", parse_msg_arg),
OPT_FILENAME('F', NULL, &msgfile, "note contents in a file"),
OPT_FILENAME('F', "file", &msgfile, "note contents in a file"),
OPT_END()
};