status: mark --find-renames option with NONEG
If you run "git status --no-find-renames", it will behave the same as "--find-renames", because we ignore the "unset" parameter (we see a NULL "arg", but since the score argument is optional, we just think that the user did not provide a score). We already have a separate "--no-renames" to disable renames, so there's not much point in supporting "--no-find-renames". Let's just flag it as an error. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Nov 5, 2018 at 01:40 UTC
d6627fb8999ac7275c1eeb42482dabd4fabfbd61
1 file changed
+1
-1
builtin/commit.c
+1
-1
@@ -1335,7 +1335,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
1335
OPT_BOOL(0, "no-renames", &no_renames, N_("do not detect renames")),
1336
{ OPTION_CALLBACK, 'M', "find-renames", &rename_score_arg,
1337
N_("n"), N_("detect renames, optionally set similarity index"),
1338
- PARSE_OPT_OPTARG, opt_parse_rename_score },
1338
+ PARSE_OPT_OPTARG | PARSE_OPT_NONEG, opt_parse_rename_score },
1339
OPT_END(),
1340
};
1341