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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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]:

> 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.

> 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@xxxxxxxxxxx>
>     Author: Joe R. Developer <joe_r@xxxxxxxxxxx>
>     Author: Joe R. Developer <joe@xxxxxxxxxxx>

> 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@xxxxxxxxx>

> Which makes all of Wincent's commits to be assigned to Junio with -j. This
> is easily fixed with an entry for gitster@xxxxxxxxx in .mailmap, which this
> commit includes. (And then, only f817546 is be assigned to Junio.)

> Signed-off-by: Adeodato Simó <dato@xxxxxxxxxxxxxx>
> ---
> 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. :-)

> 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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux