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
This commit is contained in:
Junio C Hamano 2019-03-07 09:59:55 +09:00
Родитель 19ea7228b0 9b0bd87ed2
Коммит ebf846c008
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -63,6 +63,11 @@ int cmd_prune_packed(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, prune_packed_options, argc = parse_options(argc, argv, prefix, prune_packed_options,
prune_packed_usage, 0); prune_packed_usage, 0);
if (argc > 0)
usage_msg_opt(_("too many arguments"),
prune_packed_usage,
prune_packed_options);
prune_packed_objects(opts); prune_packed_objects(opts);
return 0; return 0;
} }