@@ -1033,7 +1033,7 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
can_ff = get_can_ff(&orig_head, &merge_heads.oid[0]);
- if (default_mode && !can_ff && opt_verbosity >= 0 && !opt_ff) {
+ if (default_mode && !can_ff && opt_verbosity >= 0 && (!opt_ff || !strcmp(opt_ff, "--ff"))) {
advise(_("Pulling without specifying how to reconcile divergent branches is discouraged;\n"
"you need to specify if you want a merge, or a rebase.\n"
"You can squelch this message by running one of the following commands:\n"
@@ -46,7 +46,7 @@ test_expect_success 'pull.rebase not set and pull.ff=true' '
git reset --hard c2 &&
test_config pull.ff true &&
git pull . c1 2>err &&
- test_i18ngrep ! "Pulling without specifying how to reconcile" err
+ test_i18ngrep "Pulling without specifying how to reconcile" err
'
test_expect_success 'pull.rebase not set and pull.ff=false' '
@@ -78,7 +78,7 @@ test_expect_success 'pull.rebase not set and --merge given' '
test_expect_success 'pull.rebase not set and --ff given' '
git reset --hard c2 &&
git pull --ff . c1 2>err &&
- test_i18ngrep ! "Pulling without specifying how to reconcile" err
+ test_i18ngrep "Pulling without specifying how to reconcile" err
'
test_expect_success 'pull.rebase not set and --no-ff given' '
It's unclear why --ff should remove the warning, since: git pull --ff Is implicitly the same as: git pull Unless of course pull.ff is specified otherwise. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- builtin/pull.c | 2 +- t/t7601-merge-pull-config.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)