Skip to content

Commit ebf846c

Browse files
committed
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
2 parents 19ea722 + 9b0bd87 commit ebf846c

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
@@ -63,6 +63,11 @@ int cmd_prune_packed(int argc, const char **argv, const char *prefix)
6363
argc = parse_options(argc, argv, prefix, prune_packed_options,
6464
prune_packed_usage, 0);
6565

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

0 commit comments

Comments
 (0)