Subject: Re: [PATCH v3 1/4] stash: add test for stash create with no files

From: Junio C Hamano <[email-masked]>
Date: Mon, 29 May 2017 15:35:48 +0900

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

>> +       git stash create > actual &&
>> +       test $(cat actual | wc -l) -eq 0
> ...
> Although I wonder in this case whether you don't actually mean:
>
>     [...]>actual &&
>     ! test -s actual
>
> I.e. isn't the test that there should be no output, not that there
> shouldn't be a \n there?

Good suggestion.  There is "test_must_be_empty" you may want to use.

Also, we do not leave SP between the redirection operator and the
filename.  Your example ">actual" is good; the original goes against
our style.

Thanks.