]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/cook: notice an unused extra command line arg and fail
authorJunio C Hamano <gitster@pobox.com>
Wed, 20 Mar 2024 16:04:17 +0000 (09:04 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Mar 2024 16:47:05 +0000 (09:47 -0700)
cook

diff --git a/cook b/cook
index 6d26975f29f474d0c14df0ef03746a67ca6ed836..e1d9e6aba9a129005391503443ecd023231ce7f1 100755 (executable)
--- a/cook
+++ b/cook
@@ -1110,6 +1110,9 @@ if ($wildo) {
        wildo($fd);
 } elsif ($havedone) {
        havedone();
+} elsif (@ARGV) {
+       print STDERR "$0 does not take extra args: @ARGV\n";
+       exit 1;
 } else {
        doit();
 }