X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=builtin%2Fcheckout-index.c;h=a2a726ad8d8fa65d2fbcd1b111d71bad61c5cee8;hb=5af7417bd869d935715a56b2ccdee04d3a79a328;hp=88b86c8d9f5a0ea9c49b42e891082203b80a977f;hpb=a51c63809e67a40767313df3bb1ca3e88053ff1f;p=thirdparty%2Fgit.git diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c index 88b86c8d9f..a2a726ad8d 100644 --- a/builtin/checkout-index.c +++ b/builtin/checkout-index.c @@ -67,7 +67,8 @@ static int checkout_file(const char *name, const char *prefix) continue; did_checkout = 1; if (checkout_entry(ce, &state, - to_tempfile ? topath[ce_stage(ce)] : NULL) < 0) + to_tempfile ? topath[ce_stage(ce)] : NULL, + NULL) < 0) errs++; } @@ -111,7 +112,8 @@ static void checkout_all(const char *prefix, int prefix_length) write_tempfile_record(last_ce->name, prefix); } if (checkout_entry(ce, &state, - to_tempfile ? topath[ce_stage(ce)] : NULL) < 0) + to_tempfile ? topath[ce_stage(ce)] : NULL, + NULL) < 0) errs++; last_ce = ce; } @@ -132,6 +134,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;