From d6b6cd139359097f565023f9481c9943989e4463 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 21 Dec 2023 10:13:58 -0800 Subject: archive: "--list" does not take further options "git archive --list blah" should notice an extra command line parameter that goes unused. Make it so. Signed-off-by: Junio C Hamano --- archive.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'archive.c') diff --git a/archive.c b/archive.c index ca11db185b..8da820d1ce 100644 --- a/archive.c +++ b/archive.c @@ -685,6 +685,8 @@ static int parse_archive_args(int argc, const char **argv, base = ""; if (list) { + if (argc) + die(_("extra command line parameter '%s'"), *argv); for (i = 0; i < nr_archivers; i++) if (!is_remote || archivers[i]->flags & ARCHIVER_REMOTE) printf("%s\n", archivers[i]->name); -- cgit v1.2.3