Re: [PATCH v3] Isolate If-Modified-Since handling in gitweb
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 21, 2012, 20:09 UTC
- Message-ID
- <7viphx1zt7.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <201203212104.23192.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 6 quoted lines
>> 1: tests for i-m-s and git_feed
>> 2: refactor i-m-s handling
>
> Those two can be in single commit. Tests added need only test i-m-s
> using git_feed ('atom' or 'rss' action), as it is the only user,
> and you touch only i-m-s handling.Correct.
Show 6 quoted lines
>> 3: tests for i-m-s and git_snapshot (which fail until 4) >> 4: add i-m-s to git_snapshot > > We usually put tests together with feature. Tests before feature means > that you would need to mark them as test_expect_failure, as they would > not pass before feature is added, isn't it?
Correct.
In a more elaborate series, you would first add a lot of tests to nail the behaviour of the existing code down, then refactor or reimplement them in a different way, add tests that expect failure until the next phase, and then add features and turn expect_failure in tests to expect_success.
But I do not htink this single patch deserves that complexity. Does it even have to split into three?