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

Re: the pager

From
Jeff King <peff@peff.net>
Date
Sep 3, 2013, 08:16 UTC
Message-ID
<20130903081652.GG3608@sigill.intra.peff.net>
In-Reply-To
<201308291541.r7TFfuJr023110@freeze.ariadne.com>
On Thu, Aug 29, 2013 at 11:41:56AM -0400, Dale R. Worley wrote:
> I know I'm griping here, but I thought that part of the reward for
> contributing to an open-source project was as a showcase of one's
> work.  Commenting your code is what you learn first in programming.

You will find that the best comments in the git source code are those written in the commit messages. Learn to use "git blame" (or I recommend "tig blame" for interactive use), "git log -S", and the new "git log -L" for finding the commits that touched an area.

It is also sometimes useful to look at the review and discussion that accompanied the original patches on the list, if you are looking for rationale or alternatives that did not make it into the commit message. You can simply search on gmane, but Thomas Rast also maintains a mapping of commits back to their original discussions. You can fetch his notes by doing:

  git config remote.mailnotes.url git://github.com/trast/git.git
  git config remote.mailnotes.fetch refs/heads/notes/*:refs/notes/*
  git fetch mailnotes

You can then use "git notes --ref=gmane show" to show notes for specific commits, or just "git log --notes=gmane" to view them along with the regular logs.

-Peff
Previous: Erik Faye-LundNext: Dale R. Worley
Message 16 of 18 in “the pager”
  1. Dale R. WorleyAug 26, 2013
  2. Junio C HamanoAug 27, 2013
  3. Dale R. WorleyAug 28, 2013
  4. Junio C HamanoAug 28, 2013
  5. Dale R. WorleyAug 29, 2013
  6. Matthieu MoyAug 29, 2013
  7. Dale R. WorleySep 3, 2013
  8. Jonathan NiederSep 3, 2013
  9. pager: turn on "cat" optimization for DEFAULT_PAGERJeff King, Sep 3, 2013
  10. Junio C HamanoSep 3, 2013
  11. Erik Faye-LundNov 20, 2013
  12. Jeff KingNov 20, 2013
  13. Erik Faye-LundNov 20, 2013
  14. Junio C HamanoNov 20, 2013
  15. Erik Faye-LundNov 20, 2013
  16. Jeff KingSep 3, 2013
  17. Dale R. WorleySep 3, 2013
  18. Jeff KingSep 3, 2013

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.