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

Re: [PATCH v4] Documentation fix: git log -p does not imply -c.

From
Adam Monsen <haircut@gmail.com>
Date
Mar 8, 2011, 20:46 UTC
Message-ID
<4D7695A9.8070403@gmail.com>
In-Reply-To
<7vmxl5e6ur.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Log messages should be sufficiently understandable offline without 
> having the web access.
Ok! Makes sense.

I read some stuff before writing it (like Documentation/SubmittingPatches), but what I should have done is just thumb through the log. Many commit messages are as you say they should be.

> Something like ...<snipped>... should be sufficient.
Thanks, I'll use that. It includes history and code details I didn't know.

This is good advice about how to fit in to the git community... would you like a "commit message guide"? I did something like this for another community (Mifos), and they found it helpful. Here's a rough draft:

-----------8<-----------

Commit message guide ====================

The suggested *format* of a commit message is covered in DISCUSSION in git-commit(1). This guide covers philosophy of commit messages.

- Read previous commit messages. Emulate the best ones.
- Reveal your intentions.
- Answer questions you anticipate others will ask.
- Imagine you are reading this same commit message 10 years from now.
  What would be most helpful for you to quickly recall why these
  changes were made?
- Imagine someone else is reading this same commit message 10 years
  from now. What would be most helpful for them to quickly understand
  what this commit changes and why it was done?
- Commit messages should be sufficiently understandable without access
  to any online content.
- Be verbose!
- This is your chance to use time- and context-sensitive information
  relevant to code changed.
- Refer to related content.
  - other commits
  - mailing list discussions (but not in lieu of a proper description)
----------->8-----------
If you want a guide like this, some questions:
* do you want asciidoc, something else, or don't care?
* name it Documentation/CommitMessageGuide ? or something else?
Previous: Junio C HamanoNext: Junio C Hamano
Message 17 of 26 in “frustrated forensics: hard to find diff that undid a fix”
  1. Adam MonsenMar 5, 2011
  2. Jonathan del StrotherMar 5, 2011
  3. Jakub NarebskiMar 5, 2011
  4. Jonathan NiederMar 5, 2011
  5. Jeff KingMar 5, 2011
  6. Adam MonsenMar 5, 2011
  7. 0/2 improve combined diff documentationAdam Monsen, Mar 5, 2011
  8. 1/2 documentation fix: git log -p does not imply -c.Adam Monsen, Mar 5, 2011
  9. Junio C HamanoMar 7, 2011
  10. Jeff KingMar 7, 2011
  11. Junio C HamanoMar 7, 2011
  12. Jeff KingMar 7, 2011
  13. Documentation fix: git log -p does not imply -c.Adam Monsen, Mar 7, 2011
  14. Junio C HamanoMar 8, 2011
  15. Documentation fix: git log -p does not imply -c.Adam Monsen, Mar 8, 2011
  16. Junio C HamanoMar 8, 2011
  17. Adam MonsenMar 8, 2011
  18. Junio C HamanoMar 9, 2011
  19. Adam MonsenMar 9, 2011
  20. SubmittingPatches: clean up commit message tipsAdam Monsen, Mar 9, 2011
  21. Junio C HamanoMar 9, 2011
  22. diff format documentation: clarify --cc and -cAdam Monsen, Mar 8, 2011
  23. diff format documentation: clarify --cc and -cAdam Monsen, Mar 8, 2011
  24. Jeff KingMar 8, 2011
  25. 2/2 English grammar fixes for combined diff doc.Adam Monsen, Mar 5, 2011
  26. Martin von ZweigbergkMar 5, 2011

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.