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

Re: [PATCH v3 2/3] CodingGuidelines: hint why we value clearly written log messages

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 20, 2022, 08:23 UTC
Message-ID
<xmqqbkwwrwn7.fsf@gitster.g>
In-Reply-To
<Yl89hMGLN3DqIkJ7@google.com>
Emily Shaffer <emilyshaffer@google.com> writes:
Show 5 quoted lines
> On Thu, Apr 14, 2022 at 04:04:59PM +0200, Ævar Arnfjörð Bjarmason wrote:
>>  ...
>> For our CodingGuidelines I think it would be useful to have some version
>> of "if you can explain something with prose or tests, prefer
>> tests".

I was going to ignore this part as it is merely showing personal preference, but I guess I need to weigh in here.

Demonstrating what you meant to say in the log message with tests is fine, but that should be in addition to prose, explaining how the scenario is set up and what the user wanted to do, before showing that a command is giving an outcome that does not help what the user wanted to do.

IOW, in our CodingGUidelines, we should have "tests can be a good way to augument what you want to say, but explain it well to those who are not so familiar with the area." You do not necessarily have to explain it to 5 year old, but the audience should not have to be whoever writes the patch themself to understand it.

Show 5 quoted lines
> So as I'm deciding what to review, I definitely would prefer Victoria's
> commit message. Plus, like I mentioned, it gives the extra safeguard of
> allowing reviewers to check: does the patch actually do what the author
> meant for it to do? If we're never told what the author meant for it to
> do, then we are missing information needed for that part of the review.
I have nothing to add here.
> Anyway, I haven't watched Victoria's talk yet, but I will do so soon :)

I do not necessarily agree with the presentation order in a proposed log message she suggests, but overall, it's good investment of your time. Highly recommended.

Previous: Emily ShafferNext: Junio C Hamano
Message 22 of 28 in “[RFC] Contributor doc: more on the proposed log message”
  1. Junio C HamanoJan 23, 2022
  2. brian m. carlsonJan 23, 2022
  3. Kaartic SivaraamJan 26, 2022
  4. 0/3 contributor doc update around log messagesJunio C Hamano, Jan 26, 2022
  5. 1/3 SubmittingPatches: write problem statement in the log in the present tenseJunio C Hamano, Jan 26, 2022
  6. 2/3 CodingGuidelines: hint why we value clearly written log messagesJunio C Hamano, Jan 26, 2022
  7. Eric SunshineJan 27, 2022
  8. Junio C HamanoJan 27, 2022
  9. 3/3 SubmittingPatches: explain why we care about log messagesJunio C Hamano, Jan 26, 2022
  10. 0/3 contributor doc update around log messagesJunio C Hamano, Jan 27, 2022
  11. Emily ShafferMar 4, 2022
  12. 1/3 SubmittingPatches: write problem statement in the log in the present tenseJunio C Hamano, Jan 27, 2022
  13. Emily ShafferMar 3, 2022
  14. Junio C HamanoMar 4, 2022
  15. Emily ShafferMar 4, 2022
  16. 2/3 CodingGuidelines: hint why we value clearly written log messagesJunio C Hamano, Jan 27, 2022
  17. Emily ShafferMar 4, 2022
  18. Junio C HamanoMar 4, 2022
  19. Junio C HamanoApr 14, 2022
  20. Ævar Arnfjörð BjarmasonApr 14, 2022
  21. Emily ShafferApr 19, 2022
  22. Junio C HamanoApr 20, 2022
  23. 3/3 SubmittingPatches: explain why we care about log messagesJunio C Hamano, Jan 27, 2022
  24. Emily ShafferMar 4, 2022
  25. Junio C HamanoMar 4, 2022
  26. log messages > comments (was: [PATCH v3 3/3] SubmittingPatches: explain why we care about log messages)Ævar Arnfjörð Bjarmason, Mar 4, 2022
  27. Junio C HamanoMar 4, 2022
  28. Junio C HamanoMar 4, 2022

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.