t5520: remove redundant lines in test cases
In the previous patches, the mechanical application of changes left some duplicate statements in the test case which were not strictly incorrect but were redundant and possibly misleading. Remove these duplicate statements so that it is clear that the intent behind the tests are that the content of the file stays the same throughout the whole test case. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu committed
Nov 12, 2019 at 15:08 UTC
c245e58bb6a76e807f46b312e9a4edb2ff76f2b6
1 file changed
-8
t/t5520-pull.sh
-8
@@ -147,7 +147,6 @@ test_expect_success 'fail if wildcard spec does not match any refs' '
147
test_cmp expect file &&
148
test_must_fail git pull . "refs/nonexisting1/*:refs/nonexisting2/*" 2>err &&
149
test_i18ngrep "no candidates for merging" err &&
150
- echo file >expect &&
150
test_cmp expect file
151
'
152
@@ -161,7 +160,6 @@ test_expect_success 'fail if no branches specified with non-default remote' '
160
test_config branch.test.remote origin &&
161
test_must_fail git pull test_remote 2>err &&
162
test_i18ngrep "specify a branch on the command line" err &&
164
- echo file >expect &&
163
test_cmp expect file
164
'
165
@@ -174,7 +172,6 @@ test_expect_success 'fail if not on a branch' '
172
test_cmp expect file &&
173
test_must_fail git pull 2>err &&
174
test_i18ngrep "not currently on a branch" err &&
177
- echo file >expect &&
175
test_cmp expect file
176
'
177
@@ -188,7 +185,6 @@ test_expect_success 'fail if no configuration for current branch' '
185
test_cmp expect file &&
186
test_must_fail git pull 2>err &&
187
test_i18ngrep "no tracking information" err &&
191
- echo file >expect &&
188
test_cmp expect file
189
'
190
@@ -202,7 +198,6 @@ test_expect_success 'pull --all: fail if no configuration for current branch' '
198
test_cmp expect file &&
199
test_must_fail git pull --all 2>err &&
200
test_i18ngrep "There is no tracking information" err &&
205
- echo file >expect &&
201
test_cmp expect file
202
'
203
@@ -215,7 +210,6 @@ test_expect_success 'fail if upstream branch does not exist' '
210
test_cmp expect file &&
211
test_must_fail git pull 2>err &&
212
test_i18ngrep "no such ref was fetched" err &&
218
- echo file >expect &&
213
test_cmp expect file
214
'
215
@@ -685,10 +679,8 @@ test_expect_success 'pull --rebase fails on unborn branch with staged changes' '
679
git ls-files >actual &&
680
test_cmp expect actual &&
681
test_must_fail git pull --rebase .. master 2>err &&
688
- echo staged-file >expect &&
682
git ls-files >actual &&
683
test_cmp expect actual &&
691
- echo staged-file >expect &&
684
git show :staged-file >actual &&
685
test_cmp expect actual &&
686
test_i18ngrep "unborn branch with changes added to the index" err