Re: [PATCH v6 6/6] list-objects-filter: implement filter tree:0
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 21, 2018, 21:46 UTC
- Message-ID
- <xmqqlg8z75qo.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CAGZ79kZfZ2FWfgrvb82YxXP7zHjYDp0J_581ZHgG3un1phHxGg@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 8 quoted lines
>> ... >> OTOH, if it were up to me I would have just gotten rid of >> test_must_be_empty and used an existing function with the right >> argument, like `test_cmp /dev/null` - but using some form consistently >> is the most important, whatever it is. > > /dev/null, eh? It shows you don't use Windows on a day to day basis. ;-) > But yeah consistency is really good to have. :)
Just to make sure we don't give wrong impression to bystanders, do you mean that we should discourage using /dev/null in our tests or scripts due to portability concerns?
I thought they had good enough emulation that writing /dev/null on the command line in scripts do what we expect the shell to do; the same thing can be said for calling open(2) on "/dev/null".
Back to the topic from the tangent, but there was a discussion on choosing between "test_must_be_empty actual" vs "test_cmp empty actual", and was even a proposal to trigger an error when an empty file is given to test_cmp. You two might want to join the party there, perhaps?