summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-03-20 09:04:17 -0700
committerJunio C Hamano <gitster@pobox.com>2024-03-20 09:47:05 -0700
commit11f2323bdc8798be15d59b271d2a9d8076f03888 (patch)
tree2ce809c04b1b3135d3ba9a6cddc44be6de76a210
parentff5dce782f51d7380525b625fed84cb0325e2cbd (diff)
downloadgit-11f2323bdc8798be15d59b271d2a9d8076f03888.tar.gz
Meta/cook: notice an unused extra command line arg and fail
-rwxr-xr-xcook3
1 files changed, 3 insertions, 0 deletions
diff --git a/cook b/cook
index 6d26975f29..e1d9e6aba9 100755
--- 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();
}