From 9b0bd87ed2ae444fa0ecf55ba497e666b3911fbb Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Mon, 11 Feb 2019 17:23:40 +0000 Subject: [PATCH] prune-packed: check for too many arguments Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- builtin/prune-packed.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c index 4ff525e50f..b22b1a0539 100644 --- a/builtin/prune-packed.c +++ b/builtin/prune-packed.c @@ -62,6 +62,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; }