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
Junio C Hamano <gitster@pobox.com>
Date
Jul 12, 2026, 16:07 UTC
Message-ID
<xmqq7bn042ez.fsf@gitster.g>
In-Reply-To
<alOplirhJxIkpDYh@wyuan.org>
Weijie Yuan <wy@wyuan.org> writes:
Show 12 quoted lines
>> +2. **Solution (The Approach)**:
>> +3. **Command (The Instruction)**:
>> +   [[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.
>
> Stopped and confused for a moment. I am not sure that "Command" belongs
> alongside "Observation" and "Solution" as a third part of the message.
> Sometimes the command still describes the solution. In other words,
> Solution and Command seem not to be logically completely separable.

I do not think "Command the codebase to change" is a good phrasing. It would have been better to highlight the distinction between the design of the solution (approach) and the implementation. Perhaps

    2. Design (The Approach)
    3. Implementation (The Changes)
    [[imperative-mood]]
       Describe how the change is implemented.  Write this in the
       imperative mood. ...
or something?
>> +#### Formatting and Style Guidelines
>
> Perhaps using "====" here would be in harmony with the existing content.
Indeed.
Show 12 quoted lines
>> +* **The Body**:
>> +  * Explain the *why* rather than repeating the *what* of the diff.
>> +  * Try to make the explanation self-contained.  Avoid relying on
>> +    external URLs (like mailing list archives) as the sole
>> +    explanation; summarize the relevant points of the discussion
>> +    instead.
>> +  * Wrap lines to 68-72 columns.
>
> MyFirstContribution:
>   This commit message is intentionally formatted to 72 columns per line
>
> Should we update both?
Perhaps just to stick to "around 70".
I do not think the defaults in various editors matter.

The "wrap around 70 columns" rule exists so that in a text based email exchange, where you lose two columns to leading "> " when quoted, and an additional column with each subsequent reply, the lines will still fit on standard 80-column terminals.

Thanks.
Previous: Weijie YuanNext: Weijie Yuan
Message 4 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.