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>
Ævar Arnfjörð Bjarmason committed
Jun 5, 2018 at 14:40 UTC
1c550553c589b1bbc6f55dd074f9db55952d3431
1 file changed
+5
-3
builtin/checkout.c
+5
-3
@@ -1265,8 +1265,10 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
1265
}
1266
1267
UNLEAK(opts);
1268
- if (opts.patch_mode || opts.pathspec.nr)
1269
- return checkout_paths(&opts, new_branch_info.name);
1270
- else
1268
+ if (opts.patch_mode || opts.pathspec.nr) {
1269
+ int ret = checkout_paths(&opts, new_branch_info.name);
1270
+ return ret;
1271
+ } else {
1272
return checkout_branch(&opts, &new_branch_info);
1273
+ }
1274
}