X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin%2Fnotes.c;h=fbc347c9f09e0da4ba43982a5f7b29882080f150;hb=ff38d1a9953b3bce7741f8f962c5e067fda2d9ea;hp=f1f53a80e188327c0da21b046f0e8879caabc6af;hpb=6aa206413ad7755577cfe29b8ffd16082c211a07;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() };