summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 91b1920255..004b816635 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -161,6 +161,9 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)
static int opt_parse_rename_score(const struct option *opt, const char *arg, int unset)
{
const char **value = opt->value;
+
+ BUG_ON_OPT_NEG(unset);
+
if (arg != NULL && *arg == '=')
arg = arg + 1;
@@ -1336,7 +1339,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(),
};
@@ -1364,7 +1367,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
if (status_format != STATUS_FORMAT_PORCELAIN &&
status_format != STATUS_FORMAT_PORCELAIN_V2)
progress_flag = REFRESH_PROGRESS;
- read_index_preload(&the_index, &s.pathspec, progress_flag);
+ read_index(&the_index);
refresh_index(&the_index,
REFRESH_QUIET|REFRESH_UNMERGED|progress_flag,
&s.pathspec, NULL, NULL);