summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-03-07 00:59:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-07 00:59:55 (GMT)
commitebf846c0086114714c0162c4dc8acbf344740c1d (patch)
treed48b73e8b66440c20a338eb7014b368258569696
parent19ea7228b0b6a7a573f3601f4cafbf2d07078b34 (diff)
parent9b0bd87ed2ae444fa0ecf55ba497e666b3911fbb (diff)
downloadgit-ebf846c0086114714c0162c4dc8acbf344740c1d.zip
git-ebf846c0086114714c0162c4dc8acbf344740c1d.tar.gz
git-ebf846c0086114714c0162c4dc8acbf344740c1d.tar.bz2
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
-rw-r--r--builtin/prune-packed.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c
index a9e7b55..48c5e78 100644
--- a/builtin/prune-packed.c
+++ b/builtin/prune-packed.c
@@ -63,6 +63,11 @@ int cmd_prune_packed(int argc, const char **argv, const char *prefix)
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;
}