Skip to content

Commit 9b0bd87

Browse files
ramsay-jonesgitster
authored andcommitted
prune-packed: check for too many arguments
Signed-off-by: Ramsay Jones <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 268fbcd commit 9b0bd87

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

builtin/prune-packed.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ int cmd_prune_packed(int argc, const char **argv, const char *prefix)
6262
argc = parse_options(argc, argv, prefix, prune_packed_options,
6363
prune_packed_usage, 0);
6464

65+
if (argc > 0)
66+
usage_msg_opt(_("too many arguments"),
67+
prune_packed_usage,
68+
prune_packed_options);
69+
6570
prune_packed_objects(opts);
6671
return 0;
6772
}

0 commit comments

Comments
 (0)