summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Ramsay Jones <ramsay@ramsayjones.plus.com>2019-02-11 17:23:40 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-02-11 13:11:20 -0800
commit9b0bd87ed2ae444fa0ecf55ba497e666b3911fbb (patch)
tree9a6d1d3ddd3e038fda90f32bd3711c371a5cd97a
parentGit 2.18.1 (diff)
downloadtgif-9b0bd87ed2ae444fa0ecf55ba497e666b3911fbb.tar.xz
prune-packed: check for too many arguments
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-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 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;
}