Imported Upstream version 2.27.0
[platform/upstream/git.git] / t / t7601-merge-pull-config.sh
index c6c44ec..0f97828 100755 (executable)
@@ -27,6 +27,44 @@ test_expect_success 'setup' '
        git tag c3
 '
 
+test_expect_success 'pull.rebase not set' '
+       git reset --hard c0 &&
+       git pull . c1 2>err &&
+       test_i18ngrep "Pulling without specifying how to reconcile" err
+'
+
+test_expect_success 'pull.rebase not set and pull.ff=false' '
+       git reset --hard c0 &&
+       test_config pull.ff false &&
+       git pull . c1 2>err &&
+       test_i18ngrep "Pulling without specifying how to reconcile" err
+'
+
+test_expect_success 'pull.rebase not set and pull.ff=only' '
+       git reset --hard c0 &&
+       test_config pull.ff only &&
+       git pull . c1 2>err &&
+       test_i18ngrep ! "Pulling without specifying how to reconcile" err
+'
+
+test_expect_success 'pull.rebase not set and --rebase given' '
+       git reset --hard c0 &&
+       git pull --rebase . c1 2>err &&
+       test_i18ngrep ! "Pulling without specifying how to reconcile" err
+'
+
+test_expect_success 'pull.rebase not set and --no-rebase given' '
+       git reset --hard c0 &&
+       git pull --no-rebase . c1 2>err &&
+       test_i18ngrep ! "Pulling without specifying how to reconcile" err
+'
+
+test_expect_success 'pull.rebase not set and --ff-only given' '
+       git reset --hard c0 &&
+       git pull --ff-only . c1 2>err &&
+       test_i18ngrep ! "Pulling without specifying how to reconcile" err
+'
+
 test_expect_success 'merge c1 with c2' '
        git reset --hard c1 &&
        test -f c0.c &&