Re: [PATCH v3 1/4] stash: add test for stash create with no files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 29, 2017, 06:35 UTC
- Message-ID
- <xmqqwp906ugr.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CACBZZX7vsz9fRg6bggMETqfcK_WWFijQ1+YbLcfFauqa1s1KpQ@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 10 quoted lines
>> + 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.