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 <szeder.dev@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

SZEDER Gábor committed Feb 8, 2018 at 16:56 UTC 927c1a643a9320368a95046f855371b0ce473263
1 file changed +3 -6
t/t5510-fetch.sh
+3 -6
@@ -222,12 +222,9 @@ test_expect_success 'fetch uses remote ref names to describe new refs' '
222 (
223 cd descriptive &&
224 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
228 ) &&
229 git checkout master
230 '