From: Ævar Arnfjörð Bjarmason Date: Wed, 16 Feb 2022 08:51:05 GMT Subject: Re: [PATCH v2 1/5] t1011: add testcase demonstrating accidental loss of user modifications Message-ID: <220216.86sfsjur8m.gmgdl@evledraar.gmail.com> In-Reply-To: On Fri, Jan 14 2022, Elijah Newren via GitGitGadget wrote: > From: Elijah Newren > [...] > + test_path_is_file init.t && > + grep -q dirty init.t > [...] > + test_path_is_file init.t && > + grep -q dirty init.t Maybe I'm missing something, but can these two just be: grep dirty init.t I.e. won't grep report errors appropriately here, e.g.: $ grep foo t grep: t: Is a directory $ grep foo x grep: x: No such file or directory The only prior art I could find was the same pattern in your c449947a79d (directory rename detection: files/directories in the way of some renames, 2018-04-19). It's probably good to lose the "-q" too, unless this output is way too verbose without it. In any case the errors wouldn't be affected.