checkout: remove superfluous local variable
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller committed
Aug 3, 2013 at 13:51 UTC
f90220755064c74e1e98d49814cb93a4ce0d0ca1
1 file changed
+5
-7
builtin/checkout.c
+5
-7
@@ -228,8 +228,6 @@ static int checkout_paths(const struct checkout_opts *opts,
228
int flag;
229
struct commit *head;
230
int errs = 0;
231
- int stage = opts->writeout_stage;
232
- int merge = opts->merge;
231
int newfd;
232
struct lock_file *lock_file;
233
@@ -327,8 +325,8 @@ static int checkout_paths(const struct checkout_opts *opts,
325
continue;
326
if (opts->force) {
327
warning(_("path '%s' is unmerged"), ce->name);
330
- } else if (stage) {
331
- errs |= check_stage(stage, ce, pos);
328
+ } else if (opts->writeout_stage) {
329
+ errs |= check_stage(opts->writeout_stage, ce, pos);
330
} else if (opts->merge) {
331
errs |= check_stages((1<<2) | (1<<3), ce, pos);
332
} else {
@@ -352,9 +350,9 @@ static int checkout_paths(const struct checkout_opts *opts,
350
errs |= checkout_entry(ce, &state, NULL);
351
continue;
352
}
355
- if (stage)
356
- errs |= checkout_stage(stage, ce, pos, &state);
357
- else if (merge)
353
+ if (opts->writeout_stage)
354
+ errs |= checkout_stage(opts->writeout_stage, ce, pos, &state);
355
+ else if (opts->merge)
356
errs |= checkout_merged(pos, &state);
357
pos = skip_same_name(ce, pos) - 1;
358
}