Re: What's cooking in git.git (Oct 2010, #01; Wed, 13)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 17, 2010, 04:43 UTC
- Message-ID
- <7vk4lh5szn.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <AANLkTimr73DUBBwdj9MXOQQ=O-vmyyEZpgwdHmRsGG_-@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 22 quoted lines
> On Thu, Oct 14, 2010 at 04:46, Junio C Hamano <gitster@pobox.com> wrote: > >> - test-lib: make test_expect_code a test command >> >> Somewhat rerolled, but the largest one among the series was Nacked by a >> few people and needs to be rerolled again. > > Why did you amend this to use this sed trick: > > +sed -e 's/Z$//' >expect <<\EOF && > +not ok - 1 tests clean up even after a failure > +# Z > +# touch clean-after-failure && > +# test_when_finished rm clean-after-failure && > +# (exit 1) > +# Z > +not ok - 2 failure to clean up causes the test to fail > +# Z > +# test_when_finished \"(exit 2)\" > +# Z > > Is it just to keep it diff --check clean?
Yes and files with trailing whitespaces are hard to understand in general when reading, even outside the "should I apply that patch?" contenxt.
> Anyway if we munge the output like this the output of test_cmp will be > more confusing when it fails, because it'll be diff(1)-ing something > that the test-lib would never emit.
Hmm, why? "expect" has trailing whitespaces on lines that end with Z, i.e. what the original patch wanted to place in.