Skip to content

Commit 1c55055

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3c87aa9 commit 1c55055

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

builtin/checkout.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,8 +1265,10 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
12651265
}
12661266

12671267
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 {
12711272
return checkout_branch(&opts, &new_branch_info);
1273+
}
12721274
}

0 commit comments

Comments
 (0)