@@ -29,11 +29,8 @@ test_expect_success 'setup' '
29
29
30
30
test_expect_success ' pull.rebase not set' '
31
31
git reset --hard c0 &&
32
- git -c color.advice=always pull . c1 2>err &&
33
- test_decode_color <err >decoded &&
34
- test_i18ngrep "<YELLOW>hint: " decoded &&
35
- test_i18ngrep "Pulling without specifying how to reconcile" decoded
36
-
32
+ git pull . c1 2>err &&
33
+ test_i18ngrep ! "Pulling without specifying how to reconcile" err
37
34
'
38
35
39
36
test_expect_success ' pull.rebase not set and pull.ff=true' '
@@ -87,6 +84,65 @@ test_expect_success 'pull.rebase not set and --ff-only given' '
87
84
test_i18ngrep ! "Pulling without specifying how to reconcile" err
88
85
'
89
86
87
+ test_expect_success ' pull.rebase not set (not-fast-forward)' '
88
+ git reset --hard c2 &&
89
+ git -c color.advice=always pull . c1 2>err &&
90
+ test_decode_color <err >decoded &&
91
+ test_i18ngrep "<YELLOW>hint: " decoded &&
92
+ test_i18ngrep "Pulling without specifying how to reconcile" decoded
93
+ '
94
+
95
+ test_expect_success ' pull.rebase not set and pull.ff=true (not-fast-forward)' '
96
+ git reset --hard c2 &&
97
+ test_config pull.ff true &&
98
+ git pull . c1 2>err &&
99
+ test_i18ngrep ! "Pulling without specifying how to reconcile" err
100
+ '
101
+
102
+ test_expect_success ' pull.rebase not set and pull.ff=false (not-fast-forward)' '
103
+ git reset --hard c2 &&
104
+ test_config pull.ff false &&
105
+ git pull . c1 2>err &&
106
+ test_i18ngrep ! "Pulling without specifying how to reconcile" err
107
+ '
108
+
109
+ test_expect_success ' pull.rebase not set and pull.ff=only (not-fast-forward)' '
110
+ git reset --hard c2 &&
111
+ test_config pull.ff only &&
112
+ test_must_fail git pull . c1 2>err &&
113
+ test_i18ngrep ! "Pulling without specifying how to reconcile" err
114
+ '
115
+
116
+ test_expect_success ' pull.rebase not set and --rebase given (not-fast-forward)' '
117
+ git reset --hard c2 &&
118
+ git pull --rebase . c1 2>err &&
119
+ test_i18ngrep ! "Pulling without specifying how to reconcile" err
120
+ '
121
+
122
+ test_expect_success ' pull.rebase not set and --no-rebase given (not-fast-forward)' '
123
+ git reset --hard c2 &&
124
+ git pull --no-rebase . c1 2>err &&
125
+ test_i18ngrep ! "Pulling without specifying how to reconcile" err
126
+ '
127
+
128
+ test_expect_success ' pull.rebase not set and --ff given (not-fast-forward)' '
129
+ git reset --hard c2 &&
130
+ git pull --ff . c1 2>err &&
131
+ test_i18ngrep ! "Pulling without specifying how to reconcile" err
132
+ '
133
+
134
+ test_expect_success ' pull.rebase not set and --no-ff given (not-fast-forward)' '
135
+ git reset --hard c2 &&
136
+ git pull --no-ff . c1 2>err &&
137
+ test_i18ngrep ! "Pulling without specifying how to reconcile" err
138
+ '
139
+
140
+ test_expect_success ' pull.rebase not set and --ff-only given (not-fast-forward)' '
141
+ git reset --hard c2 &&
142
+ test_must_fail git pull --ff-only . c1 2>err &&
143
+ test_i18ngrep ! "Pulling without specifying how to reconcile" err
144
+ '
145
+
90
146
test_expect_success ' merge c1 with c2' '
91
147
git reset --hard c1 &&
92
148
test -f c0.c &&
0 commit comments