From: Johan Herland Date: Sat, 13 Feb 2010 21:28:31 +0000 (+0100) Subject: builtin-notes: Add --message/--file aliases for -m/-F options X-Git-Tag: v1.7.1-rc0~37^2~22 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ba20f15e0a220705695a1ee19fb28234861b890d;p=git.git builtin-notes: Add --message/--file aliases for -m/-F options Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt index 4d29d5fb9..8969f6f8f 100644 --- a/Documentation/git-notes.txt +++ b/Documentation/git-notes.txt @@ -58,11 +58,13 @@ prune:: OPTIONS ------- -m :: +--message=:: Use the given note message (instead of prompting). If multiple `-m` options are given, their values are concatenated as separate paragraphs. -F :: +--file=:: Take the note message from the given file. Use '-' to read the note message from the standard input. diff --git a/builtin-notes.c b/builtin-notes.c index b80853412..ec959bcb3 100644 --- a/builtin-notes.c +++ b/builtin-notes.c @@ -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() };