checkout: remove superfluous local variable
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
b7df098c6d
commit
f902207550
|
@ -228,8 +228,6 @@ static int checkout_paths(const struct checkout_opts *opts,
|
||||||
int flag;
|
int flag;
|
||||||
struct commit *head;
|
struct commit *head;
|
||||||
int errs = 0;
|
int errs = 0;
|
||||||
int stage = opts->writeout_stage;
|
|
||||||
int merge = opts->merge;
|
|
||||||
int newfd;
|
int newfd;
|
||||||
struct lock_file *lock_file;
|
struct lock_file *lock_file;
|
||||||
|
|
||||||
|
@ -327,8 +325,8 @@ static int checkout_paths(const struct checkout_opts *opts,
|
||||||
continue;
|
continue;
|
||||||
if (opts->force) {
|
if (opts->force) {
|
||||||
warning(_("path '%s' is unmerged"), ce->name);
|
warning(_("path '%s' is unmerged"), ce->name);
|
||||||
} else if (stage) {
|
} else if (opts->writeout_stage) {
|
||||||
errs |= check_stage(stage, ce, pos);
|
errs |= check_stage(opts->writeout_stage, ce, pos);
|
||||||
} else if (opts->merge) {
|
} else if (opts->merge) {
|
||||||
errs |= check_stages((1<<2) | (1<<3), ce, pos);
|
errs |= check_stages((1<<2) | (1<<3), ce, pos);
|
||||||
} else {
|
} else {
|
||||||
|
@ -352,9 +350,9 @@ static int checkout_paths(const struct checkout_opts *opts,
|
||||||
errs |= checkout_entry(ce, &state, NULL);
|
errs |= checkout_entry(ce, &state, NULL);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (stage)
|
if (opts->writeout_stage)
|
||||||
errs |= checkout_stage(stage, ce, pos, &state);
|
errs |= checkout_stage(opts->writeout_stage, ce, pos, &state);
|
||||||
else if (merge)
|
else if (opts->merge)
|
||||||
errs |= checkout_merged(pos, &state);
|
errs |= checkout_merged(pos, &state);
|
||||||
pos = skip_same_name(ce, pos) - 1;
|
pos = skip_same_name(ce, pos) - 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue