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

[RFC/PATCH 0/4] add git-check-mailmap command

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 10, 2013, 19:03 UTC
Message-ID
<1373483041-27901-1-git-send-email-sunshine@sunshineco.com>

This patch series adds builtin command check-mailmap, similar to check-attr and check-ignore, which allows direct testing of .mailmap configuration. More importantly, as plumbing accessible to scripts and other porcelain, check-mailmap publishes the stable, well-tested .mailmap functionality employed by built-in Git commands.

It is RFC because it lacks documentation; because its utility as a check-foo command is minimal compared to check-attr and check-ignore (although its utility as plumbing for scripts and porcelain is more significant); and because I want to make sure that the project is willing to accept yet another check-foo command.

The idea and motivation for git-check-mailmap arose from the effort to implement .mailmap support for git-contacts [1] (presently at es/contacts in 'pu').

Felipe's Ruby implementation of .mailmap support for his git-related script is introduced in patch 9/15 [2] of v5, and is augmented in patch 10/15 [3] to support invocation from within a subdirectory. His version supports configuration variable mailmap.file, but not mailmap.blob.

Rather than rewriting the functionality yet again, this time in Perl, along with all the details and nuances of the C version employed by Git builtins, I decided that it made more sense to expose the well-tested and polished C implementation as plumbing, thus allowing any script or porcelain to take advantage of it.

[1]: http://thread.gmane.org/gmane.comp.version-control.git/229533/ [2]: http://article.gmane.org/gmane.comp.version-control.git/224782/ [3]: http://article.gmane.org/gmane.comp.version-control.git/224783/

Eric Sunshine (4):
  builtin: add git-check-mailmap command
  t4203: test check-mailmap command invocation
  t4203: test mailmap functionality directly rather than indirectly
  t4203: consolidate test-repository setup
 .gitignore                             |   1 +
 Makefile                               |   1 +
 builtin.h                              |   1 +
 builtin/check-mailmap.c                |  73 ++++++++++
 command-list.txt                       |   1 +
 contrib/completion/git-completion.bash |   1 +
 git.c                                  |   1 +
 t/t4203-mailmap.sh                     | 246 +++++++++++++++++----------------
 8 files changed, 209 insertions(+), 116 deletions(-)
 create mode 100644 builtin/check-mailmap.c
-- 
1.8.3.2
Next: Eric Sunshine
Message 1 of 10 in “add git-check-mailmap command”
  1. 0/4 add git-check-mailmap commandEric Sunshine, Jul 10, 2013
  2. 1/4 builtin: add git-check-mailmap commandEric Sunshine, Jul 10, 2013
  3. Duy NguyenJul 11, 2013
  4. Eric SunshineJul 11, 2013
  5. Duy NguyenJul 11, 2013
  6. Antoine PelisseJul 11, 2013
  7. Eric SunshineJul 11, 2013
  8. 2/4 t4203: test check-mailmap command invocationEric Sunshine, Jul 10, 2013
  9. 3/4 t4203: test mailmap functionality directly rather than indirectlyEric Sunshine, Jul 10, 2013
  10. 4/4 t4203: consolidate test-repository setupEric Sunshine, Jul 10, 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.