On Mon, Dec 9, 2019 at 4:32 PM Denton Liu <liu.denton@xxxxxxxxx> wrote: > On Mon, Dec 09, 2019 at 08:47:39PM +0000, Elijah Newren via GitGitGadget wrote: > > +test_expect_failure 'status of untracked directory with --ignored works with or without prefix' ' > > + git status --porcelain --ignored | grep untracked/ >actual && > > Can we break this pipe up into two invocations so that we don't have a > git command in the upstream of a pipe? > > P.S. Perhaps in the future, we (I) could try to extend chainlint so that > it catches this and git commands in non-assignment command > substitutions... I think that would be pretty nice. Rather than getting mired down in chainlint (which could make your eyeballs melt), an easier way to catch this sort of thing would be to introduce a new script which checks test scripts for Git best-practices non-conformity, similar to how t/check-non-portable-shell.pl checks for non-portable shell constructs. (You could even extend check-non-portable-shell.pl with the functionality, but then the script would no longer be specific to "non-portable shell", so either renaming it or making a new new script is warranted.) By the way, I have considered adding a best-practices linting script like this, but it (at least at first) would need to have some sort of opt-in or opt-out feature since there (likely) are still so many instances of tests which don't follow best-practices, and it could take a while to "fix" them all (and eat up a lot of reviewer time, so it should be done in small batches).