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

Re: [PATCH/RFC 1/4] contrib: add git-contacts helper

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 2, 2013, 19:04 UTC
Message-ID
<CAPig+cSt2+xjRo36veWSAJbAJ+q5XKSox7Gr=1892znFz5Tgcw@mail.gmail.com>
In-Reply-To
<7vk3l895in.fsf@alter.siamese.dyndns.org>
On Tue, Jul 2, 2013 at 2:32 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 35 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
>>> The author name and email can be grabbed from the "blame" output
>>> without doing this (and the result may be more robust), but you
>>> would need to read from the log message anyway, so I think this is
>>> OK.
>>>
>>> Note that the names and emails in blame output are sanitized via the
>>> mailmap mechanism, but "cat-file commit" will certainly not be.
>>
>> Thanks for pointing this out. Grabbing the author name and email from
>> git-blame output does seem like a better approach.
>
> Well, that was not what I was suggesting.  Reading from blame output
> will map only the author/committer names/addresses, and you have two
> choices:
>
>  (1) if you read author/committer from blame output and other names
>      from the commit object without applying mailmap, the same
>      person can appear under different names, from his authorship
>      (mapped name) and from his name on footers (unmapped), which
>      would be inconsistent.  By reading from "author" and
>      "committer" header lines in the commit object, you will be at
>      least consistently using unmapped names.
>
>  (2) if you want to apply mailmap to names you collect by reading
>      the footer, you will write the mapping logic yourself anyway,
>      and at that point, passing the names you collect by reading the
>      "author" and "committer" header lines in the commit object to
>      the same logic will give you mapped names. At that point, you
>      do not gain much by reading names from the blame output.
>
> So in either case, you would be better off not reading the
> author/committer from blame output, as long as you need to pick up
> other names from the commit object payload.
Thanks for the clarification.
Previous: Junio C HamanoNext: Eric Sunshine
Message 7 of 15 in “Perl rewrite of Ruby git-related”
  1. 0/4 Perl rewrite of Ruby git-relatedEric Sunshine, Jun 30, 2013
  2. 1/4 contrib: add git-contacts helperEric Sunshine, Jun 30, 2013
  3. Junio C HamanoJul 1, 2013
  4. Junio C HamanoJul 1, 2013
  5. Eric SunshineJul 2, 2013
  6. Junio C HamanoJul 2, 2013
  7. Eric SunshineJul 2, 2013
  8. 2/4 contrib: contacts: add support for multiple patchesEric Sunshine, Jun 30, 2013
  9. Junio C HamanoJul 1, 2013
  10. Junio C HamanoJul 1, 2013
  11. Eric SunshineJul 2, 2013
  12. 3/4 contrib: contacts: add ability to parse from committishEric Sunshine, Jun 30, 2013
  13. 4/4 contrib: contacts: interpret committish akin to format-patchEric Sunshine, Jun 30, 2013
  14. Junio C HamanoJul 1, 2013
  15. Eric SunshineJul 2, 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.