From: Junio C Hamano Date: Thu, 7 Mar 2019 00:59:55 +0000 (+0900) Subject: Merge branch 'rj/prune-packed-excess-args' X-Git-Tag: v2.22.0-rc0~172 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ebf846c0086114714c0162c4dc8acbf344740c1d?ds=inline;hp=-c Merge branch 'rj/prune-packed-excess-args' "git prune-packed" did not notice and complain against excess arguments given from the command line, which now it does. * rj/prune-packed-excess-args: prune-packed: check for too many arguments --- ebf846c0086114714c0162c4dc8acbf344740c1d diff --combined builtin/prune-packed.c index a9e7b552b9,b22b1a0539..48c5e78e33 --- a/builtin/prune-packed.c +++ b/builtin/prune-packed.c @@@ -3,7 -3,6 +3,7 @@@ #include "progress.h" #include "parse-options.h" #include "packfile.h" +#include "object-store.h" static const char * const prune_packed_usage[] = { N_("git prune-packed [-n | --dry-run] [-q | --quiet]"), @@@ -63,6 -62,11 +63,11 @@@ int cmd_prune_packed(int argc, const ch argc = parse_options(argc, argv, prefix, prune_packed_options, prune_packed_usage, 0); + if (argc > 0) + usage_msg_opt(_("too many arguments"), + prune_packed_usage, + prune_packed_options); + prune_packed_objects(opts); return 0; }