Re: [PATCH 07/11] t7001: use ': >' rather than 'touch'
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Sep 25, 2020, 18:57 UTC
- Message-ID
- <CAPig+cTwQCSA1sjAWyDC5ZydT6NKzOY9ziLUJcOVMRV4cP_sAQ@mail.gmail.com>
- In-Reply-To
- <20200925170256.11490-8-shubhunic@gmail.com>
On Fri, Sep 25, 2020 at 1:03 PM shubham verma <shubhunic@gmail.com> wrote:
> t7001: use ': >' rather than 'touch' > > Use `>` rather than `touch` to create an empty file when the > timestamp isn't relevant to the test.
There is an inconsistency here. In the subject you say ": >" but in the body just ">".
A couple more comments below...
Show 7 quoted lines
> Signed-off-by: shubham verma <shubhunic@gmail.com> > --- > diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh > @@ -47,14 +47,14 @@ test_expect_success 'checking -k on non-existing file' ' > test_expect_success 'checking -k on untracked file' ' > - touch untracked1 && > + : > untracked1 &&
In patch [5/11] you dropped whitespace following the redirection operator, however, this patch introduces several new cases of unwanted whitespace.
Checking "master", I see that there are 209 instances of `: >` in tests, but 1023 instances of `>`, which suggests that we should stick with plain `>` rather than `: >` in this patch.