Skip to content

Commit 927c1a6

Browse files
szedergitster
authored andcommitted
t5510: consolidate 'grep' and 'test_i18ngrep' patterns
One of the tests in 't5510-fetch.sh' checks the output of 'git fetch' using 'test_i18ngrep', and while doing so it prefilters the output with 'grep' before piping the result into 'test_i18ngrep'. This prefiltering is unnecessary, with the appropriate pattern 'test_i18ngrep' can do it all by itself. Furthermore, piping data into 'test_i18ngrep' will interfere with the linting that will be added in a later patch. Signed-off-by: SZEDER Gábor <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3b85ec3 commit 927c1a6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

t/t5510-fetch.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,9 @@ test_expect_success 'fetch uses remote ref names to describe new refs' '
222222
(
223223
cd descriptive &&
224224
git fetch o 2>actual &&
225-
grep " -> refs/crazyheads/descriptive-branch$" actual |
226-
test_i18ngrep "new branch" &&
227-
grep " -> descriptive-tag$" actual |
228-
test_i18ngrep "new tag" &&
229-
grep " -> crazy$" actual |
230-
test_i18ngrep "new ref"
225+
test_i18ngrep "new branch.* -> refs/crazyheads/descriptive-branch$" actual &&
226+
test_i18ngrep "new tag.* -> descriptive-tag$" actual &&
227+
test_i18ngrep "new ref.* -> crazy$" actual
231228
) &&
232229
git checkout master
233230
'

0 commit comments

Comments
 (0)