summaryrefslogtreecommitdiff
path: root/t/t7601-merge-pull-config.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7601-merge-pull-config.sh')
-rwxr-xr-xt/t7601-merge-pull-config.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh
index c6c44ec570..0f97828cd0 100755
--- a/t/t7601-merge-pull-config.sh
+++ b/t/t7601-merge-pull-config.sh
@@ -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 &&