'git notes' [list [<object>]]
'git notes' add [-f] [-F <file> | -m <msg>] [<object>]
'git notes' append [-F <file> | -m <msg>] [<object>]
-'git notes' edit [-F <file> | -m <msg>] [<object>]
+'git notes' edit [<object>]
'git notes' show [<object>]
'git notes' remove [<object>]
'git notes' prune
"git notes [list [<object>]]",
"git notes add [-f] [-m <msg> | -F <file>] [<object>]",
"git notes append [-m <msg> | -F <file>] [<object>]",
- "git notes edit [-m <msg> | -F <file>] [<object>]",
+ "git notes edit [<object>]",
"git notes show [<object>]",
"git notes remove [<object>]",
"git notes prune",
const char *msgfile = NULL;
struct msg_arg msg = { 0, STRBUF_INIT };
struct option options[] = {
- OPT_GROUP("Notes edit options"),
+ OPT_GROUP("Notes options"),
OPT_CALLBACK('m', "message", &msg, "msg",
"note contents as a string", parse_msg_arg),
OPT_FILENAME('F', "file", &msgfile, "note contents in a file"),
usage_with_options(git_notes_usage, options);
}
+ if ((msg.given || msgfile) && edit) {
+ fprintf(stderr, "The -m and -F options has been deprecated for"
+ " the 'edit' subcommand.\n"
+ "Please use 'git notes add -f -m/-F' instead.\n");
+ }
+
if (msg.given && msgfile) {
error("mixing -m and -F options is not allowed.");
usage_with_options(git_notes_usage, options);
git add file1 &&
test_tick &&
git commit -m 1st &&
- git notes edit -m "Note #1" &&
+ git notes add -m "Note #1" &&
: > file2 &&
git add file2 &&
test_tick &&
git commit -m 2nd &&
- git notes edit -m "Note #2" &&
+ git notes add -m "Note #2" &&
: > file3 &&
git add file3 &&
test_tick &&
git commit -m 3rd &&
- git notes edit -m "Note #3"
+ git notes add -m "Note #3"
'
cat > expect <<END_OF_LOG