pack-objects: merge read_lock and lock in packing_data struct
[gitweb.git] / builtin / checkout-index.c
index d92db62fbdf15c14ff3d85b767a069b22aa3897d..eb74774cbc9d6bd6acf1b7fe2f31b8e80e461a12 100644 (file)
@@ -132,6 +132,8 @@ static const char * const builtin_checkout_index_usage[] = {
 static int option_parse_stage(const struct option *opt,
                              const char *arg, int unset)
 {
+       BUG_ON_OPT_NEG(unset);
+
        if (!strcmp(arg, "all")) {
                to_tempfile = 1;
                checkout_stage = CHECKOUT_ALL;
@@ -172,7 +174,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
                        N_("write the content to temporary files")),
                OPT_STRING(0, "prefix", &state.base_dir, N_("string"),
                        N_("when creating files, prepend <string>")),
-               { OPTION_CALLBACK, 0, "stage", NULL, "1-3|all",
+               { OPTION_CALLBACK, 0, "stage", NULL, "(1|2|3|all)",
                        N_("copy out the files from named stage"),
                        PARSE_OPT_NONEG, option_parse_stage },
                OPT_END()