git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 2/4] Add testcases for the --detect-dir-renames diffcore flag.

From
Andreas Ericsson <ae@op5.se>
Date
Oct 5, 2010, 09:21 UTC
Message-ID
<4CAAEE36.4060000@op5.se>
In-Reply-To
<20101004213703.GW4983@home.lan>
On 10/04/2010 11:37 PM, Yann Dirson wrote:
Show 12 quoted lines
> On Mon, Oct 04, 2010 at 03:32:41PM -0500, Jonathan Nieder wrote:
>> Yann Dirson wrote:
>>
>>> From: Yann Dirson<ydirson@free.fr>
>>> Subject: Add testcases for the --detect-dir-renames diffcore flag
>>
>> Probably better for the test to be squashed with the patch that adds
>> that option.
> 
> I tend to agree, but we see quite a lot of patches split this way it
> seems.  Junio, any preference here ?
> 

Personally, I prefer adding the test first with "test_expect_failure" and then changing it to test_expect_success in the patch that has the real code changes. That way it's really easy to accept a testcase and still keep altering how the test itself is fixed, which is usually a far more complex and nitpickley process than showing that the bug is there in the first place.

I know Junio has voiced the same preference for patchseries before and especially when the solution isn't obvious. Note that I obviously can't speak for him in any particular case.

Patches adding features should ofcourse have the code first and the tests after, since the tests in that case are only about preventing future breakage rather than showing that there is one now.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Previous: Jonathan NiederNext: Ævar Arnfjörð Bjarmason
Message 16 of 25 in “Detection of directory renames”
  1. 0/4 Detection of directory renamesYann Dirson, Oct 3, 2010
  2. 1/4 Introduce wholesame directory move detection in diffcore.Yann Dirson, Oct 3, 2010
  3. 2/4 Add testcases for the --detect-dir-renames diffcore flag.Yann Dirson, Oct 3, 2010
  4. 3/4 Allow hiding renames of individual files involved in a directory rename.Yann Dirson, Oct 3, 2010
  5. 4/4 Add testcases for the --hide-dir-rename-details diffcore flag.Yann Dirson, Oct 3, 2010
  6. Sverre RabbelierOct 3, 2010
  7. Sverre RabbelierOct 3, 2010
  8. Junio C HamanoOct 3, 2010
  9. Sverre RabbelierOct 4, 2010
  10. Yann DirsonOct 4, 2010
  11. Ævar Arnfjörð BjarmasonOct 4, 2010
  12. Yann DirsonOct 4, 2010
  13. Jonathan NiederOct 4, 2010
  14. Yann DirsonOct 4, 2010
  15. Jonathan NiederOct 4, 2010
  16. Andreas EricssonOct 5, 2010
  17. Ævar Arnfjörð BjarmasonOct 4, 2010
  18. Yann DirsonOct 4, 2010
  19. Jonathan NiederOct 4, 2010
  20. Yann DirsonOct 4, 2010
  21. Jonathan NiederOct 5, 2010
  22. Yann DirsonOct 6, 2010
  23. Jonathan NiederOct 4, 2010
  24. Jonathan NiederOct 5, 2010
  25. Yann DirsonOct 6, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.