Skip to content

Commit

Permalink
builtin/checkout.c: use "ret" variable for return
Browse files Browse the repository at this point in the history
There is no point in doing this right now, but in later change the
"ret" variable will be inspected. This change makes that meaningful
change smaller.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
avar authored and gitster committed Jun 11, 2018
1 parent 3c87aa9 commit 1c55055
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions builtin/checkout.c
Expand Up @@ -1265,8 +1265,10 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
}

UNLEAK(opts);
if (opts.patch_mode || opts.pathspec.nr)
return checkout_paths(&opts, new_branch_info.name);
else
if (opts.patch_mode || opts.pathspec.nr) {
int ret = checkout_paths(&opts, new_branch_info.name);
return ret;
} else {
return checkout_branch(&opts, &new_branch_info);
}
}

0 comments on commit 1c55055

Please sign in to comment.