summaryrefslogtreecommitdiff
path: root/builtin/pull.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/pull.c')
-rw-r--r--builtin/pull.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/builtin/pull.c b/builtin/pull.c
index 3e13f81084..d979660482 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -1046,9 +1046,14 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
can_ff = get_can_ff(&orig_head, &merge_heads.oid[0]);
- if (rebase_unspecified && !opt_ff && !can_ff) {
- if (opt_verbosity >= 0)
- show_advice_pull_non_ff();
+ if (!can_ff) {
+ if (opt_ff) {
+ if (!strcmp(opt_ff, "--ff-only"))
+ die_ff_impossible();
+ } else {
+ if (rebase_unspecified && opt_verbosity >= 0)
+ show_advice_pull_non_ff();
+ }
}
if (opt_rebase) {