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

Re: [PATCH v3 0/2] test: tests for the "double > from mailmap" bug

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 14, 2012, 22:22 UTC
Message-ID
<CAMP44s2v25w=14t8ZK82n-_01UCYWuUr2kAb3jEf2YfRiu2uyA@mail.gmail.com>
In-Reply-To
<20120214220732.GB24802@sigill.intra.peff.net>
On Wed, Feb 15, 2012 at 12:07 AM, Jeff King <peff@peff.net> wrote:
Show 22 quoted lines
> On Tue, Feb 14, 2012 at 11:52:11PM +0200, Felipe Contreras wrote:
>
>> On Tue, Feb 14, 2012 at 11:14 PM, Jeff King <peff@peff.net> wrote:
>> > My general review process is (in this order):
>> >
>> >  1. Figure out why a change is needed. This should be explained in the
>> >     commit message. And no, just adding tests is not assumed to be
>> >     needed.  Why did the old tests not cover this case?
>>
>> As I already mentioned more than once; the first patch is not related
>> to any fix.
>
> Really? I didn't see it mentioned in your commit message, which
> consisted entirely of:
>
>  t: mailmap: add 'git blame -e' tests
>
> Yes, I know you mentioned it elsewhere in the thread. But review should
> happen on what is actually in the posted patch. That is what reviewers
> are guaranteed to have read, and it is what people reading "git log" in
> a year will see. If there was other discussion or context that led to
> the patch, it's helpful in both cases to summarize it.

Seriously? You want to add a note saying "These tests don't tackle any known issues". Well, if it did, logically, it would have been mentioned.

Show 8 quoted lines
>> >     The answer can
>> >     be a simple "nobody bothered to write them", and that's OK.
>>
>>  That can be derived from the word "add". You can't add something that
>> is already there.
>
> Are there already git-blame tests, but not "blame -e" tests? If there
> are already "blame" tests, why do we additionally need "blame -e" tests?

You are right, it's impossible to decipher that the output of 'blame -e' is different than 'blame'. Surely, somebody must have made a mistake when the patch was applied.

Or we can apply common sense.
> I can guess, or I can do my own digging in the history to find out, but
> that makes review a lot more painful. You already did the digging and
> came to understand the problem when you made your patch. Why not just
> share it?
Because there's no need.

Why would anybody add tests that are already there? Why do you have to assume the worst?

Show 10 quoted lines
>> >     But
>> >     some description of the current state can help reviewers understand
>> >     the rationale (e.g., "we tested with shortlog, but not mailmap, and
>> >     certain code paths are only exposed through mailmap").
>>
>> You are assuming too much. That's not the purpose, that's why I didn't menti
>
> Sorry, that should have been s/mailmap/blame/ above. But if I am making
> wrong assumptions about the rationale, then isn't that a sign that the
> commit message is insufficient?

If you mean the second patch, this was already pointed out by Junio, and I already said I would clarify that these are meant to target 'git blame' output.

Show 9 quoted lines
>> >  2. Figure out what the change should be doing.
>>
>> t: mailmap: add 'git blame -e' tests
>>
>> That's what the change should be doing; nothing more, nothing less.
>
> Yes, I think you did describe the "what", which in this case is very
> simple. But as I mentioned before, it is not just knowing the "what" but
> evaluating that the "what" meets the "why" from step 1.

The why can be derived. Unless you seriously think Junio would allow patches that say they "add" tests for something (which imply there isn't tests for that), where they don't.

Show 9 quoted lines
>> I wonder why you have to assume the worst. When I see a commit message
>> like that, I assume that there were no previous tests for that (thus
>> the word 'add'), and that's all I need to know.
>
> I don't necessarily assume the worst. If I were the maintainer, I might
> even have taken your patch as-is, as it's pretty simple. But I found a
> description like the one Jonathan included to be _much_ easier to
> review. Whether yours was above a minimum threshold or not, I think it's
> worth striving to be better.

Better != more words. English, like code, is good as simple as possible (but not simpler).

If you start from the premise that the patch is good; it has been s-o-b by Junio, and it has been applied, and released, what more do you need from the summary "t: mailmap: add 'git blame -e' tests". Can you derive the rest?

Cheers.
-- 
Felipe Contreras
Previous: Jeff KingNext: Jeff King
Message 24 of 29 in “t: add blame -e tests for mailmap”
  1. 0/2 t: add blame -e tests for mailmapFelipe Contreras, Feb 14, 2012
  2. 1/2 t: mailmap: add 'git blame -e' testsFelipe Contreras, Feb 14, 2012
  3. 2/2 t: mailmap: add simple name translation testFelipe Contreras, Feb 14, 2012
  4. Junio C HamanoFeb 14, 2012
  5. Felipe ContrerasFeb 14, 2012
  6. 0/2 test: tests for the "double > from mailmap" bugJonathan Nieder, Feb 14, 2012
  7. 1/2 test: mailmap can change author name without changing emailJonathan Nieder, Feb 14, 2012
  8. Felipe ContrerasFeb 14, 2012
  9. Jonathan NiederFeb 14, 2012
  10. Felipe ContrerasFeb 14, 2012
  11. 2/2 test: check that "git blame -e" uses mailmap correctlyJonathan Nieder, Feb 14, 2012
  12. Felipe ContrerasFeb 14, 2012
  13. Jonathan NiederFeb 14, 2012
  14. Felipe ContrerasFeb 14, 2012
  15. Felipe ContrerasFeb 14, 2012
  16. Jonathan NiederFeb 14, 2012
  17. Felipe ContrerasFeb 14, 2012
  18. Jonathan NiederFeb 14, 2012
  19. Felipe ContrerasFeb 14, 2012
  20. Jeff KingFeb 14, 2012
  21. Jonathan NiederFeb 14, 2012
  22. Felipe ContrerasFeb 14, 2012
  23. Jeff KingFeb 14, 2012
  24. Felipe ContrerasFeb 14, 2012
  25. Jeff KingFeb 14, 2012
  26. Junio C HamanoFeb 14, 2012
  27. Felipe ContrerasFeb 14, 2012
  28. Junio C HamanoFeb 14, 2012
  29. Felipe ContrerasFeb 14, 2012

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.