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

Re: [PATCH v2 3/4] fast-export: don't handle uninteresting refs

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 31, 2012, 01:51 UTC
Message-ID
<20121031015103.GA15167@elie.Belkin>
In-Reply-To
<CAMP44s0RcbAiUmvGACxO+H-b-anQSPXxUqUuZwYRKWfrpXYeew@mail.gmail.com>
Felipe Contreras wrote:
Show 6 quoted lines
>                                                    It's not my job to
> explain to you that 'git fast-export' doesn't work this way, you have
> a command line to type those commands and see for yourself if they do
> what you think they do with a vanilla version of git. That's exactly
> what I did, to make sure I'm not using assumptions as basis  for
> arguing, it took me a few minutes.

Well no, when I run "git blame" 10 years down the line and do not understand what your code is doing, it is not at all reasonable to expect me to checkout the parent commit, get it to compile with a modern toolchain, and type those commands for myself.

Instead, the commit message should be self-contained and explain what the patch does.

That has multiple parts:
 - first, what the current behavior is
 - second, what the intent behind the current behavior is.  This is
   crucial information because presumably we want the change not to
   break that.
 - third, what change the patch makes
 - fourth, what the consequences of that are, in terms of new use
   cases that become possible and old use cases that become less
   convenient
 - fifth, optionally, how the need for this change was discovered
   (real-life usage, code inspection, or something else)
 - sixth, optionally, implementation considerations and alternate
   approaches that were discarded

If you run "git log", you'll see many good and bad examples to think over and compare to this goal. It's hard work to describe one's work well in terms that other people can understand, but I think it can be satisfying, and in any event, it's just as necessary as including comments near confusing code.

Sincerely, Jonathan

Previous: Felipe ContrerasNext: Felipe Contreras
Message 24 of 29 in “Re: [PATCH v2 4/4] fast-export: make sure refs are updated properly”
  1. Sverre RabbelierOct 30, 2012
  2. Felipe ContrerasOct 30, 2012
  3. Sverre RabbelierOct 30, 2012
  4. Felipe ContrerasOct 30, 2012
  5. Jonathan NiederOct 30, 2012
  6. Felipe ContrerasOct 30, 2012
  7. Sverre RabbelierOct 30, 2012
  8. Felipe ContrerasOct 30, 2012
  9. Sverre RabbelierOct 30, 2012
  10. Felipe ContrerasOct 30, 2012
  11. Jonathan NiederOct 30, 2012
  12. Jonathan NiederOct 30, 2012
  13. Jonathan NiederOct 30, 2012
  14. Felipe ContrerasOct 30, 2012
  15. Felipe ContrerasOct 30, 2012
  16. Jonathan NiederOct 30, 2012
  17. Felipe ContrerasOct 30, 2012
  18. Jonathan NiederOct 30, 2012
  19. Felipe ContrerasOct 30, 2012
  20. Jonathan NiederOct 30, 2012
  21. Felipe ContrerasOct 31, 2012
  22. Jonathan NiederOct 31, 2012
  23. Felipe ContrerasOct 31, 2012
  24. Jonathan NiederOct 31, 2012
  25. Felipe ContrerasOct 31, 2012
  26. Jonathan NiederOct 31, 2012
  27. Felipe ContrerasOct 31, 2012
  28. Jonathan NiederOct 31, 2012
  29. Johannes SchindelinOct 30, 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.