summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-11-05 06:40:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-06 03:55:35 (GMT)
commitd6627fb8999ac7275c1eeb42482dabd4fabfbd61 (patch)
treedcfe6cfe78c01d7dd558d4ae00fd7add14f4ad4f /builtin/commit.c
parent0ad1efb4b379b4d47166c04b3103c6ead3a79673 (diff)
downloadgit-d6627fb8999ac7275c1eeb42482dabd4fabfbd61.zip
git-d6627fb8999ac7275c1eeb42482dabd4fabfbd61.tar.gz
git-d6627fb8999ac7275c1eeb42482dabd4fabfbd61.tar.bz2
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>
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 074bd9a..4d7754c 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1335,7 +1335,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "no-renames", &no_renames, N_("do not detect renames")),
{ OPTION_CALLBACK, 'M', "find-renames", &rename_score_arg,
N_("n"), N_("detect renames, optionally set similarity index"),
- PARSE_OPT_OPTARG, opt_parse_rename_score },
+ PARSE_OPT_OPTARG | PARSE_OPT_NONEG, opt_parse_rename_score },
OPT_END(),
};