From 1c550553c589b1bbc6f55dd074f9db55952d3431 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 5 Jun 2018 14:40:47 +0000 Subject: [PATCH] builtin/checkout.c: use "ret" variable for return MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- builtin/checkout.c | 8 +++++--- 1 file 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); + } } -- 2.47.1