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

Re: [PATCH 1/6] SubmittingPatches: clarify expected structure of commit log message

From
Michael Montalbo <mmontalbo@gmail.com>
Date
Jul 12, 2026, 20:26 UTC
Message-ID
<CAC2QwmL05MbVS=jtk7ARj6jJUT461Ws7BcYqUAUrywvDDXjJqg@mail.gmail.com>
In-Reply-To
<20260711192650.2417665-2-gitster@pobox.com>
On Sat, Jul 11, 2026 at 12:27 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
>
> +2. **Solution (The Approach)**:
> +   Justify the way your change solves the problem.  Explain why the
> +   proposed approach is better and mention any alternate solutions
> +   considered and discarded.

Slight reflow suggestion (answers the question "better than what?" and is more concise):

"Explain why the proposed approach is better than any alternate solutions that were considered and discarded."

Show 10 quoted lines
> ++
> +If your change only addresses a subset of a larger problem (e.g.,
> +handles directories but not files because of characteristic Y),
> +explain this limitation.  This helps future developers understand the
> +boundaries of your work and whether it can be safely extended.
> ++
> +If the change resolves design or viability concerns raised by the
> +community during prior review rounds, ensure the message records the
> +resolution, explaining why the chosen approach was accepted over
> +alternatives.

In the spirit of paring down text, this last section seems to overlap with the prior "alternative solutions considered" blurb above. Maybe they can be combined?

> +
> +3. **Command (The Instruction)**:

"Command" reads a bit awkwardly to me. I think something about "Implementation" or another phrase that distinguishes between the mechanics of the change and the design of the change might be more clear.

Show 22 quoted lines
> +   [[imperative-mood]]
> +   Command the codebase to change.  Write this in the **imperative
> +   mood** (e.g., "make xyzzy do frotz" instead of "This patch makes
> +   xyzzy do..." or "I changed xyzzy..."), as if you are giving orders
> +   to the codebase to change its behavior.
> +
> +#### Formatting and Style Guidelines
> +
> +* **The Subject Line (First Line)**:
> +  * Keep it short (50 characters is the soft limit).
> +  * Skip the full stop at the end.
> +  * Prefix the subject with the modified area followed by a colon
> +    and a space (e.g., "area: subject").  The area is typically a
> +    filename or identifier (e.g., `doc:`, `transport:`, `t5601:`).
> +    Run `git log --no-merges` on target files to see conventions.
> +  * [[summary-section]]
> +    Do not capitalize the first word after the "area:" prefix unless
> +    there is a specific reason (e.g., `HEAD` is always in caps).
> +    E.g., use "doc: clarify...", not "doc: Clarify...".
> +
> +* **The Body**:
> +  * Explain the *why* rather than repeating the *what* of the diff.

I think collapsing the "Formatting and Style Guidelines" section with the above would be clearer than having a separate section. The content prior to this section mixes "content" and "formatting" guidelines so maybe those concepts could be explicitly delineated and the advice in this section could be co-located with the commit message component it is related to above. That might also help eliminate some redundancy (i.e., another reference to "why vs. what").

Some more general feedback: maybe examples of well vs. poorly formed components would help distill the advice for a reader.

Overall, I think reducing the amount of text a contributor needs to read in order to get up to speed is a very worthwhile endeavor, so thank you!

Previous: Weijie YuanNext: Junio C Hamano
Message 6 of 21 in “Update Contributor Guides”
  1. 0/6 Update Contributor GuidesJunio C Hamano, Jul 11, 2026
  2. 1/6 SubmittingPatches: clarify expected structure of commit log messageJunio C Hamano, Jul 11, 2026
  3. Weijie YuanJul 12, 2026
  4. Junio C HamanoJul 12, 2026
  5. Weijie YuanJul 13, 2026
  6. Michael MontalboJul 12, 2026
  7. Junio C HamanoJul 13, 2026
  8. Weijie YuanJul 13, 2026
  9. D. Ben KnobleJul 14, 2026
  10. Weijie YuanJul 17, 2026
  11. 2/6 MyFirstContribution: what if I don't get a reply?Junio C Hamano, Jul 11, 2026
  12. Patrick SteinhardtJul 17, 2026
  13. Junio C HamanoJul 17, 2026
  14. 3/6 MyFirstContribution: carrying over trailersJunio C Hamano, Jul 11, 2026
  15. 4/6 MyFirstContribution: clarify that 'seen' does not mean acceptanceJunio C Hamano, Jul 11, 2026
  16. Matt HunterJul 12, 2026
  17. Junio C HamanoJul 12, 2026
  18. 5/6 SubmittingPatches: clarify the meaning of "Will queue"Junio C Hamano, Jul 11, 2026
  19. 6/6 SubmittingPatches: clarify the writing style of whats-cookingJunio C Hamano, Jul 11, 2026
  20. Michael MontalboJul 12, 2026
  21. Junio C HamanoJul 13, 2026

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.