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

[PATCH 0/2] mailmap from blobs

From
Jeff King <peff@peff.net>
Date
Dec 12, 2012, 10:58 UTC
Message-ID
<20121212105822.GA15842@sigill.intra.peff.net>

I noticed recently that the GitHub contributions page for git.git did not seem very accurate. The problem is that while it uses shortlog, it does not respect .mailmap, because we do not have a working tree from which to read the .mailmap.

This series adds a config option analogous to mailmap.file, but which reads from a blob in the repository (so the obvious thing to set it to is "HEAD:.mailmap" in a bare repo, and probably "master:.mailmap" if you frequently want to traverse while on unrelated branches). The obvious alternative is to checkout a temporary file of .mailmap and point mailmap.file at it, but this is a bit more convenient.

A config option is perhaps not the most flexible way to access this. For example, one could in theory want to pull the mailmap from the tip of the history being traversed (e.g., because you have multiple unrelated DAGs in a single repo). But that could also produce the _wrong_ results, if you are looking at the shortlog of older history (e.g., when doing "git shortlog v1.5.0..v1.5.5", you would still want to be using the modern mailmap from "master").

By making it a config option, the simple, common case does the right thing, and people with complex cases can use "git -c mailmap.blob=..." to feed the appropriate map for the history they are traversing. If somebody wants to do something fancier (like --mailmap-from-tip or something), it would be easy to build on top later.

  [1/2]: mailmap: refactor mailmap parsing for non-file sources
  [2/2]: mailmap: support reading mailmap from blobs
-Peff
Next: Jeff King
Message 1 of 9 in “mailmap from blobs”
  1. 0/2 mailmap from blobsJeff King, Dec 12, 2012
  2. 1/2 mailmap: refactor mailmap parsing for non-file sourcesJeff King, Dec 12, 2012
  3. 2/2 mailmap: support reading mailmap from blobsJeff King, Dec 12, 2012
  4. 3/2 mailmap: clean up read_mailmap error handlingJeff King, Dec 12, 2012
  5. Jeff KingDec 13, 2012
  6. Junio C HamanoDec 12, 2012
  7. Jeff KingDec 12, 2012
  8. Jeff KingDec 13, 2012
  9. Junio C HamanoDec 13, 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.