Skip to content

Commit

Permalink
checkout: remove superfluous local variable
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Stefan Beller authored and Junio C Hamano committed Aug 5, 2013
1 parent b7df098 commit f902207
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions builtin/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ static int checkout_paths(const struct checkout_opts *opts,
int flag;
struct commit *head;
int errs = 0;
int stage = opts->writeout_stage;
int merge = opts->merge;
int newfd;
struct lock_file *lock_file;

Expand Down Expand Up @@ -327,8 +325,8 @@ static int checkout_paths(const struct checkout_opts *opts,
continue;
if (opts->force) {
warning(_("path '%s' is unmerged"), ce->name);
} else if (stage) {
errs |= check_stage(stage, ce, pos);
} else if (opts->writeout_stage) {
errs |= check_stage(opts->writeout_stage, ce, pos);
} else if (opts->merge) {
errs |= check_stages((1<<2) | (1<<3), ce, pos);
} else {
Expand All @@ -352,9 +350,9 @@ static int checkout_paths(const struct checkout_opts *opts,
errs |= checkout_entry(ce, &state, NULL);
continue;
}
if (stage)
errs |= checkout_stage(stage, ce, pos, &state);
else if (merge)
if (opts->writeout_stage)
errs |= checkout_stage(opts->writeout_stage, ce, pos, &state);
else if (opts->merge)
errs |= checkout_merged(pos, &state);
pos = skip_same_name(ce, pos) - 1;
}
Expand Down

0 comments on commit f902207

Please sign in to comment.