threads / discuss / 40943

Show total commit count of two authors or more authors into first author

Subject: Show total commit count of two authors or more authors into first author

## tl;dr

5 messages between Dec 6, 2015 and Dec 7, 2015.

replies: 4people: 4as markdown or json

Jagan Teki· Dec 6, 2015, 19:23 UTC · lore
I usually count commits as below command
$ git shortlog -s -n
   149  Jagan Teki
   148  Otavio Salvador
   143  Bo Shen
   137  Lokesh Vutla
   134  Minkyu Kang
   132  Marian Balakowicz
   129  Haavard Skinnemoen
   127  Holger Brunck
   124  Tim Harvey
   122  Jagannadha Teki
   120  Daniel Schwierzeck
   119  Eric Nelson
   118  Andy Fleming
   116  Jagannadha Sutradharudu Teki
Out of which below three names are with same author which changed
while submitted patches.
  149  Jagan Teki
  122  Jagannadha Teki
  116  Jagannadha Sutradharudu Teki
I need a command to show to add all commits and show first one as
   387 Jagan Teki
Can anyone help to do this?
thanks!
-- 
Jagan.
Andreas Schwab· Dec 6, 2015, 19:31 UTC · re: Jagan Teki · lore

Re: Show total commit count of two authors or more authors into first author

Jagan Teki <jagannadh.teki@gmail.com> writes:
Show 10 quoted lines
> Out of which below three names are with same author which changed
> while submitted patches.
>   149  Jagan Teki
>   122  Jagannadha Teki
>   116  Jagannadha Sutradharudu Teki
>
> I need a command to show to add all commits and show first one as
>    387 Jagan Teki
>
> Can anyone help to do this?
See the "MAPPING AUTHORS" section of git-shortlog(1).
       The .mailmap feature is used to coalesce together commits by the same
       person in the shortlog, where their name and/or email address was
       spelled differently.
       If the file .mailmap exists at the toplevel of the repository, or at
       the location pointed to by the mailmap.file or mailmap.blob
       configuration options, it is used to map author and committer names and
       email addresses to canonical real names and email addresses.
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Jagan Teki· Dec 6, 2015, 20:15 UTC · re: Andreas Schwab · lore

Re: Show total commit count of two authors or more authors into first author

On 7 December 2015 at 01:01, Andreas Schwab <schwab@linux-m68k.org> wrote:
Show 23 quoted lines
> Jagan Teki <jagannadh.teki@gmail.com> writes:
>
>> Out of which below three names are with same author which changed
>> while submitted patches.
>>   149  Jagan Teki
>>   122  Jagannadha Teki
>>   116  Jagannadha Sutradharudu Teki
>>
>> I need a command to show to add all commits and show first one as
>>    387 Jagan Teki
>>
>> Can anyone help to do this?
>
> See the "MAPPING AUTHORS" section of git-shortlog(1).
>
>        The .mailmap feature is used to coalesce together commits by the same
>        person in the shortlog, where their name and/or email address was
>        spelled differently.
>
>        If the file .mailmap exists at the toplevel of the repository, or at
>        the location pointed to by the mailmap.file or mailmap.blob
>        configuration options, it is used to map author and committer names and
>        email addresses to canonical real names and email addresses.

Thanks for the info, I'm able to map two author with e-mail but it's not working when I group 3

$ .mailmap Jagan Teki <a@abc.com> Jagannadha Teki <x@xynz.com>

The above worked but how about 3 names mapping

$ .mailmap Jagan Teki <a@abc.com> Jagannadha Teki <x@xynz.com> Jagannadha Sutradharudu Teki<p@pqr.com>

Finally I need to map all 3 into Jagan Teki <a@abc.com>
-- 
Jagan.
brian m. carlson· Dec 6, 2015, 21:20 UTC · re: Jagan Teki · lore

Re: Show total commit count of two authors or more authors into first author

On Mon, Dec 07, 2015 at 01:45:19AM +0530, Jagan Teki wrote:
Show 13 quoted lines
> Thanks for the info, I'm able to map two author with e-mail but it's
> not working when I group 3
> 
> $ .mailmap
> Jagan Teki <a@abc.com> Jagannadha Teki <x@xynz.com>
> 
> The above worked but how about 3 names mapping
> 
> $ .mailmap
> Jagan Teki <a@abc.com> Jagannadha Teki <x@xynz.com> Jagannadha
> Sutradharudu Teki<p@pqr.com>
> 
> Finally I need to map all 3 into Jagan Teki <a@abc.com>
You probably want to map two at a time.  So something like this:
  Jagan Teki <a@abc.com> Jagannadha Teki <x@xynz.com>
  Jagan Teki <a@abc.com> Jagannadha Sutradharudu Teki <p@pqr.com>
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Jagan Teki· Dec 7, 2015, 06:01 UTC · re: brian m. carlson · lore

Re: Show total commit count of two authors or more authors into first author

On 7 December 2015 at 02:50, brian m. carlson <sandals@crustytoothpaste.net> wrote:

Show 19 quoted lines
> On Mon, Dec 07, 2015 at 01:45:19AM +0530, Jagan Teki wrote:
>> Thanks for the info, I'm able to map two author with e-mail but it's
>> not working when I group 3
>>
>> $ .mailmap
>> Jagan Teki <a@abc.com> Jagannadha Teki <x@xynz.com>
>>
>> The above worked but how about 3 names mapping
>>
>> $ .mailmap
>> Jagan Teki <a@abc.com> Jagannadha Teki <x@xynz.com> Jagannadha
>> Sutradharudu Teki<p@pqr.com>
>>
>> Finally I need to map all 3 into Jagan Teki <a@abc.com>
>
> You probably want to map two at a time.  So something like this:
>
>   Jagan Teki <a@abc.com> Jagannadha Teki <x@xynz.com>
>   Jagan Teki <a@abc.com> Jagannadha Sutradharudu Teki <p@pqr.com>

I tried this before seems like some more hidden name's with same author. anyway I found all and mapped the same. Thanks you very much.

-- 
Jagan.

← back to recent threads