Subject: Re: [PATCH 1/2] t750*: make tests for commit messages more pedantic

From: Junio C Hamano <[email-masked]>
Date: Thu, 28 May 2015 11:55:53 -0700

Eric Sunshine <[email-masked]> writes:

> On Tue, May 26, 2015 at 2:15 AM, Patryk Obara <[email-masked]> wrote:
>> Currently messages are compared with --pretty=format:%s%b which does
>> not retain raw format of commit message. In result it's not clear what
>> part of expected commit msg is subject and what part is body. Also, it's
>> impossible to test if messages with multiple lines are handled
>> correctly, which may be significant when using nondefault --cleanup.
>
> Makes sense.
> ...
>> +test_expect_success 'template without newline before eof should work with --status' '
>
> It's not clear what "should work" means. I suppose you mean that the
> end result should have exactly one newline after the template. Perhaps
> the test title could indicate the intent more clearly.

I agree that what "should work" in this title is unclear.

Because there is nothing wrong in the current system, if a follow-up
patch plans to change the established behaviour, the tests in this
"currently we do not test blank lines, so add tests for them" patch
should limit themselves to document the current behaviour.

Then a follow-up patch that modifies the behaviour can show how the
updated behaviour is different and illustrate in what way it is
better than the current behaviour.  That would be one way to justify
the change.