X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fnotes.c;h=fbc347c9f09e0da4ba43982a5f7b29882080f150;hb=3988da063611de7391f794791a4622caf47c0708;hp=f1f53a80e188327c0da21b046f0e8879caabc6af;hpb=cf4403a01070f03e5c5cc65b52c1351d20ff4e91;p=git.git diff --git a/builtin/notes.c b/builtin/notes.c index f1f53a80e..fbc347c9f 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -614,6 +614,10 @@ static int copy(int argc, const char **argv, const char *prefix) } } + if (argc < 2) { + error("too few parameters"); + usage_with_options(git_notes_copy_usage, options); + } if (2 < argc) { error("too many parameters"); usage_with_options(git_notes_copy_usage, options); @@ -794,8 +798,9 @@ static int prune(int argc, const char **argv, const char *prefix) struct notes_tree *t; int show_only = 0, verbose = 0; struct option options[] = { - OPT_BOOLEAN('n', NULL, &show_only, "do not remove, show only"), - OPT_BOOLEAN('v', NULL, &verbose, "report pruned notes"), + OPT_BOOLEAN('n', "dry-run", &show_only, + "do not remove, show only"), + OPT_BOOLEAN('v', "verbose", &verbose, "report pruned notes"), OPT_END() };