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

Re: [PATCH/RFC] shortlog: add option to group together different names/emails of an author

From
Adeodato Simó <dato@net.com.org.es>
Date
Jan 19, 2009, 13:43 UTC
Message-ID
<20090119134346.GA27509@chistera.yi.org>
In-Reply-To
<1231600589-11811-1-git-send-email-dato@net.com.org.es>

Ping? I realize this may be seen as a big patch dropped out of the blue, but I would very much like to hear some comments on at least the feature itself, which should not take more than reading the commit message. (Hints as to what to do to get people to comment on the code also welcome, of course.)

--- Adeodato Simó [Sat, 10 Jan 2009 16:16:29 +0100]:
Show 6 quoted lines
> It's common for repositories to contain commits with different spellings of
> an author name, or different email addresses. The shortlog command tries to
> alleviate this by using .mailmap files. However, maintaining a .mailmap file
> up to date is a manual process, and it does not help when shortlog is
> invoked with the -e option and different email addresses for an author are
> involved.
Show 5 quoted lines
> This commit introduces a -j/--join-uids option that uses a very dumb logic
> to detect different spellings and addresses of a same author. In particular,
> it just joins commits when either the name or the address had been
> previously seen, attaching the commit to that previous id. In other words,
> these three ids will be joined:
>     Author: Joe Developer <joe@example.com>
>     Author: Joe R. Developer <joe_r@example.com>
>     Author: Joe R. Developer <joe@example.com>
> but only because of the third spelling. The first two alone would be left
> separate. When the names and addresses are printed, the most common spelling
> and address are used.
> Incidentally, there is f817546 in git.git which has this author information:
>     Author: Wincent Colaiuta <gitster@pobox.com>
> Which makes all of Wincent's commits to be assigned to Junio with -j. This
> is easily fixed with an entry for gitster@pobox.com in .mailmap, which this
> commit includes. (And then, only f817546 is be assigned to Junio.)
Show 6 quoted lines
> Signed-off-by: Adeodato Simó <dato@net.com.org.es>
> ---
> This is my scratching of my own itch: I was used to `bzr author-stats`,
> which is equivalent to `git shortlog -jsne`. I realize -sn comes close,
> but I like having the email address listed. Please let me know what you
> think.
> Tests and a mention in git-shortlog.txt are missing. That'll come next
> when/if I'm told this has a chance of inclusion. :-)
Show 5 quoted lines
> The code is valgrind'ed. I'm not completely confident, though, bugs will
> not be hiding in corner cases. Also, I don't see any appreciable
> slowdown with this version in git.git, particularly not between the
> current git-shortlog and this new when run without -j (not when run with
> -j either, but that's less critical).
> This patch applies on top of my as/maint-shortlog-cleanup branch.
>  .mailmap           |    1 +
>  builtin-shortlog.c |  280 +++++++++++++++++++++++++++++++++++++++++++++-------
>  shortlog.h         |   14 ++-
>  3 files changed, 256 insertions(+), 39 deletions(-)
-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
Don't be irreplaceable, if you can't be replaced, you can't be promoted.
Previous: Adeodato SimóNext: Johannes Schindelin
Message 2 of 5 in “shortlog: add option to group together different names/emails of an author”
  1. shortlog: add option to group together different names/emails of an authorAdeodato Simó, Jan 10, 2009
  2. Adeodato SimóJan 19, 2009
  3. Johannes SchindelinJan 19, 2009
  4. Adeodato SimóJan 19, 2009
  5. Johannes SchindelinJan 19, 2009

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.