Skip to content

Commit a751e02

Browse files
felipecgitster
authored andcommitted
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>
1 parent 3400622 commit a751e02

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

builtin/pull.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,6 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
10531053

10541054
if (opt_rebase) {
10551055
int ret = 0;
1056-
int ran_ff = 0;
10571056

10581057
struct object_id newbase;
10591058
struct object_id upstream;
@@ -1068,11 +1067,10 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
10681067
if (can_ff) {
10691068
/* we can fast-forward this without invoking rebase */
10701069
opt_ff = "--ff-only";
1071-
ran_ff = 1;
10721070
ret = run_merge();
1073-
}
1074-
if (!ran_ff)
1071+
} else {
10751072
ret = run_rebase(&newbase, &upstream);
1073+
}
10761074

10771075
if (!ret && (recurse_submodules == RECURSE_SUBMODULES_ON ||
10781076
recurse_submodules == RECURSE_SUBMODULES_ON_DEMAND))

0 commit comments

Comments
 (0)