Re: [PATCH 01/10] t5541: add 'test_i18ngrep's missing filename parameter
- From
Jeff King <peff@peff.net>
- Date
- Jan 26, 2018, 18:23 UTC
- Message-ID
- <20180126182303.GA27618@sigill.intra.peff.net>
- In-Reply-To
- <20180126123708.21722-2-szeder.dev@gmail.com>
On Fri, Jan 26, 2018 at 01:36:59PM +0100, SZEDER Gábor wrote:
Show 8 quoted lines
> The test 'push --no-progress silences progress but not status' runs > 'test_i18ngrep' without specifying a filename parameter. This has > remained unnoticed since its introduction in e304aeba2 (t5541: test > more combinations of --progress, 2012-05-01), because that > 'test_i18ngrep' is supposed to check that the given pattern is not > present in its input, and of course it won't find that pattern if its > input is empty, (as it comes from /dev/null). This also means that > this test could miss a potential breakage of 'git push --no-progress'.
Oof, embarrassing. Thanks for catching.
This and other errors make me wonder if test_i18ngrep ought to take an explicit "-" for stdin, and error out if no file argument is given. That may be overkill, though (and it's not like we wouldn't have the same problem with regular "grep").
-Peff