From: Jonathan Nieder Date: Tue, 28 May 2013 17:19:07 GMT Subject: Re: [PATCH 4/5] test: improve rebase -q test Message-ID: <20130528171907.GA28153@google.com> In-Reply-To: <7vvc6311dr.fsf@alter.siamese.dyndns.org> Junio C Hamano wrote: > A more preferrable alternative may be adding something like this to > test-lib.sh and call it from here and elsewhere (there are about 50 > places that do "test ! -s "), perhaps? > > test_must_be_an_empty_file () { > if test -s "$1" > then > cat "$1" > false > fi > } I generally just use the two-liner >empty && test_cmp empty output directly in cases like this. Thanks, Jonathan