Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-06-05 17:40:47 +0300
committerJunio C Hamano <gitster@pobox.com>2018-06-11 19:41:01 +0300
commit1c550553c589b1bbc6f55dd074f9db55952d3431 (patch)
tree93dc73a8353efe68aaa9f8d52efb1b5b0ff64b72
parent3c87aa946a9ffc31cf1355b11e63df7c3315a2f9 (diff)
builtin/checkout.c: use "ret" variable for return
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>
-rw-r--r--builtin/checkout.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 72457fb7d5..8c93c55cbc 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -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);
+ }
}