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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

> On Tue, May 26, 2015 at 2:15 AM, Patryk Obara <patryk.obara@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]