Skip to content

Commit

Permalink
prune-packed: check for too many arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Ramsay Jones <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
ramsay-jones authored and gitster committed Feb 11, 2019
1 parent 268fbcd commit 9b0bd87
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions builtin/prune-packed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 9b0bd87

Please sign in to comment.