pull: trivial cleanup
There's no need to store ran_ff. Now it's obvious from the conditionals. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras committed
Jun 17, 2021 at 11:17 UTC
a751e0296f6771e4dec6258d8c3f9bf658da30de
1 file changed
+2
-4
builtin/pull.c
+2
-4
@@ -1053,7 +1053,6 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
1053
1054
if (opt_rebase) {
1055
int ret = 0;
1056
- int ran_ff = 0;
1056
1057
struct object_id newbase;
1058
struct object_id upstream;
@@ -1068,11 +1067,10 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
1067
if (can_ff) {
1068
/* we can fast-forward this without invoking rebase */
1069
opt_ff = "--ff-only";
1071
- ran_ff = 1;
1070
ret = run_merge();
1073
- }
1074
- if (!ran_ff)
1071
+ } else {
1072
ret = run_rebase(&newbase, &upstream);
1073
+ }
1074
1075
if (!ret && (recurse_submodules == RECURSE_SUBMODULES_ON ||
1076
recurse_submodules == RECURSE_SUBMODULES_ON_DEMAND))