Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2021-06-17 19:17:09 +0300
committerJunio C Hamano <gitster@pobox.com>2021-06-19 10:36:17 +0300
commita751e0296f6771e4dec6258d8c3f9bf658da30de (patch)
tree426b3083b3b28450349414d034d01889cff17840 /builtin
parent340062243a474b8fa56f4c3f6572bf015392f7f9 (diff)
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/pull.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin/pull.c b/builtin/pull.c
index a22293b7db..80e2f55cbc 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -1053,7 +1053,6 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
if (opt_rebase) {
int ret = 0;
- int ran_ff = 0;
struct object_id newbase;
struct object_id upstream;
@@ -1068,11 +1067,10 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
if (can_ff) {
/* we can fast-forward this without invoking rebase */
opt_ff = "--ff-only";
- ran_ff = 1;
ret = run_merge();
- }
- if (!ran_ff)
+ } else {
ret = run_rebase(&newbase, &upstream);
+ }
if (!ret && (recurse_submodules == RECURSE_SUBMODULES_ON ||
recurse_submodules == RECURSE_SUBMODULES_ON_DEMAND))