# [Query] Can we ignore case for commiters name in shortlog?

9 messages from 2012-11-30 to 2012-11-30. Participants: viresh kumar, Viresh Kumar, Nicolas Pitre, David Aguilar, Max Horn, Damien Robert, Andreas Schwab.
Thread: https://gitlist.dev/t/32248

## viresh kumar, 2012-11-30 02:09

Subject: [Query] Can we ignore case for commiters name in shortlog?
Message-ID: <CAOh2x==NBeeoE2=PhaDC143ZF_xHKD5m=Po+-DS2X43CEeGiEQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAOh2x%3D%3DNBeeoE2%3DPhaDC143ZF_xHKD5m%3DPo%2B-DS2X43CEeGiEQ%40mail.gmail.com

```
Hi Junio and others,

I have a query. git shortlog lists the patches submitted per commiter, like:

> Viresh Kumar (7):
>       cpufreq: Improve debug prints
>       cpufreq: return early from __cpufreq_driver_getavg()
>       cpufreq: governors: remove redundant code
>       cpufreq: Fix sparse warnings by updating cputime64_t to u64
>       cpufreq: Fix sparse warning by making local function static
>       cpufreq: Avoid calling cpufreq driver's target() routine if target_freq == policy->cur
>       cpufreq: Make sure target freq is within limits

> viresh kumar (3):
>       cpufreq / core: Fix typo in comment describing show_bios_limit()
>       cpufreq / core: Fix printing of governor and driver name
>       cpufreq: Move common part from governors to separate file, v2

I know, there was something wrong at my end and i have commited stuff
with different cases.

I was just thinking if we can ignore case for commiter name while
listing stuff here?
So, that we get over any manual mistakes from commiter.

--
viresh

```

## David Aguilar, 2012-11-30 03:24

Subject: Re: [Query] Can we ignore case for commiters name in shortlog?
Message-ID: <CAJDDKr7yr2JSutcEy1mz-SfMq8ZdNzR3+s++ooenn5+wD-LDAw@mail.gmail.com>
URL: https://gitlist.dev/e/CAJDDKr7yr2JSutcEy1mz-SfMq8ZdNzR3%2Bs%2B%2Booenn5%2BwD-LDAw%40mail.gmail.com
In-Reply-To: <CAOh2x==NBeeoE2=PhaDC143ZF_xHKD5m=Po+-DS2X43CEeGiEQ@mail.gmail.com>

```
On Thu, Nov 29, 2012 at 6:09 PM, viresh kumar <viresh.kumar@linaro.org> wrote:
> Hi Junio and others,
>
> I have a query. git shortlog lists the patches submitted per commiter, like:
>
>> Viresh Kumar (7):
>>       cpufreq: Improve debug prints
>>       cpufreq: return early from __cpufreq_driver_getavg()
>>       cpufreq: governors: remove redundant code
>>       cpufreq: Fix sparse warnings by updating cputime64_t to u64
>>       cpufreq: Fix sparse warning by making local function static
>>       cpufreq: Avoid calling cpufreq driver's target() routine if target_freq == policy->cur
>>       cpufreq: Make sure target freq is within limits
>
>> viresh kumar (3):
>>       cpufreq / core: Fix typo in comment describing show_bios_limit()
>>       cpufreq / core: Fix printing of governor and driver name
>>       cpufreq: Move common part from governors to separate file, v2
>
> I know, there was something wrong at my end and i have commited stuff
> with different cases.
>
> I was just thinking if we can ignore case for commiter name while
> listing stuff here?
> So, that we get over any manual mistakes from commiter.

There's a feature that does exactly this.

http://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html

See the section called "Mapping Authors".
It discusses the .mailmap file.
-- 
David

```

## Viresh Kumar, 2012-11-30 03:32

Subject: Re: [Query] Can we ignore case for commiters name in shortlog?
Message-ID: <CAKohpom6PBbC+vp9X4o3ioo1PS9kRbHKiWuMxuR1WeGOeA7L5Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAKohpom6PBbC%2Bvp9X4o3ioo1PS9kRbHKiWuMxuR1WeGOeA7L5Q%40mail.gmail.com
In-Reply-To: <CAJDDKr7yr2JSutcEy1mz-SfMq8ZdNzR3+s++ooenn5+wD-LDAw@mail.gmail.com>

```
On 30 November 2012 08:54, David Aguilar <davvid@gmail.com> wrote:
> There's a feature that does exactly this.
>
> http://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html
>
> See the section called "Mapping Authors".
> It discusses the .mailmap file.

I have my name there :)

I thought using names with different case is actually different then misspelling
it. And so, everybody must not be required to update their names in mailmap
with different case. So, with same email id and same name (that may be in
different case), we can show commits together in shortlog.

--
viresh

```

## Nicolas Pitre, 2012-11-30 03:33

Subject: Re: [Query] Can we ignore case for commiters name in shortlog?
Message-ID: <alpine.LFD.2.02.1211292231520.4576@xanadu.home>
URL: https://gitlist.dev/e/alpine.LFD.2.02.1211292231520.4576%40xanadu.home
In-Reply-To: <CAOh2x==NBeeoE2=PhaDC143ZF_xHKD5m=Po+-DS2X43CEeGiEQ@mail.gmail.com>

```
On Fri, 30 Nov 2012, viresh kumar wrote:

> Hi Junio and others,
> 
> I have a query. git shortlog lists the patches submitted per commiter, like:
> 
> > Viresh Kumar (7):
> >       cpufreq: Improve debug prints
> >       cpufreq: return early from __cpufreq_driver_getavg()
> >       cpufreq: governors: remove redundant code
> >       cpufreq: Fix sparse warnings by updating cputime64_t to u64
> >       cpufreq: Fix sparse warning by making local function static
> >       cpufreq: Avoid calling cpufreq driver's target() routine if target_freq == policy->cur
> >       cpufreq: Make sure target freq is within limits
> 
> > viresh kumar (3):
> >       cpufreq / core: Fix typo in comment describing show_bios_limit()
> >       cpufreq / core: Fix printing of governor and driver name
> >       cpufreq: Move common part from governors to separate file, v2
> 
> I know, there was something wrong at my end and i have commited stuff
> with different cases.
> 
> I was just thinking if we can ignore case for commiter name while
> listing stuff here?
> So, that we get over any manual mistakes from commiter.

Have a look at the .mailmap file in the top directory of your repo.


Nicolas

```

## Viresh Kumar, 2012-11-30 03:35

Subject: Re: [Query] Can we ignore case for commiters name in shortlog?
Message-ID: <CAKohponGXq=P88Y=cmUPbRCeJ--VkMvJyw5th1T-WdGQnn4xWg@mail.gmail.com>
URL: https://gitlist.dev/e/CAKohponGXq%3DP88Y%3DcmUPbRCeJ--VkMvJyw5th1T-WdGQnn4xWg%40mail.gmail.com
In-Reply-To: <alpine.LFD.2.02.1211292231520.4576@xanadu.home>

```
On 30 November 2012 09:03, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:

> Have a look at the .mailmap file in the top directory of your repo.

Repeating what i said to David in other mail:

I have my name there :)

I thought using names with different case is actually different then misspelling
it. And so, everybody must not be required to update their names in mailmap
with different case. So, with same email id and same name (that may be in
different case), we can show commits together in shortlog.

--
viresh

```

## Max Horn, 2012-11-30 11:19

Subject: Re: [Query] Can we ignore case for commiters name in shortlog?
Message-ID: <C9C7BAF7-D552-41CF-B45D-413B9B69C054@quendi.de>
URL: https://gitlist.dev/e/C9C7BAF7-D552-41CF-B45D-413B9B69C054%40quendi.de
In-Reply-To: <CAKohponGXq=P88Y=cmUPbRCeJ--VkMvJyw5th1T-WdGQnn4xWg@mail.gmail.com>

```

On 30.11.2012, at 04:35, viresh kumar wrote:

> On 30 November 2012 09:03, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> 
>> Have a look at the .mailmap file in the top directory of your repo.
> 
> Repeating what i said to David in other mail:
> 
> I have my name there :)
> 
> I thought using names with different case is actually different then misspelling
> it. And so, everybody must not be required to update their names in mailmap
> with different case. So, with same email id and same name (that may be in
> different case), we can show commits together in shortlog.

I don't see how wrong case is different from any other form of misspelling. And mailmap is there precisely to handle such problems. Now, if these case issues were for some reasons very frequent, it might be worth adding dedicated support for it. But this seems dubious to me -- do you have any evidence for this? Indeed, do you have more than just the one example?

In a nutshell, there seem to be two options here, and I know which *I* find more appealing ;)

1) continue this discussion over several emails to design a new feature (an option, config setting, whatever) to handle your special case, then sit down and write code for it, add documentation, add test cases to test it.

2) You just add a single entry to your mailmap to solve your problem at hand. :-)


Cheers,
Max
```

## Damien Robert, 2012-11-30 13:01

Subject: Re: [Query] Can we ignore case for commiters name in shortlog?
Message-ID: <k9aao3$til$1@ger.gmane.org>
URL: https://gitlist.dev/e/k9aao3%24til%241%40ger.gmane.org
In-Reply-To: <CAJDDKr7yr2JSutcEy1mz-SfMq8ZdNzR3+s++ooenn5+wD-LDAw@mail.gmail.com>

```
David Aguilar  wrote in message
<CAJDDKr7yr2JSutcEy1mz-SfMq8ZdNzR3+s++ooenn5+wD-LDAw@mail.gmail.com>:
> There's a feature that does exactly this.
> http://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html

By the way, the mailmap ignore case which is annoying.
I have commits as Damien.Olivier.Robert+git@gmail.com and a dummy email
address robert@numenor.night-elves. I thought that putting:

Damien Robert <Damien.Olivier.Robert+git@gmail.com> <robert@numenor.night-elves>

in the .mailmap would unify the two adresses, but it does not:

git shortlog -se
    15  Damien Robert <Damien.Olivier.Robert+git@gmail.com>
    266  Damien Robert <damien.olivier.robert+git@gmail.com>

as you can see, the Damien.Olivier.Robert+git as been lowercased to
damien.olivier.robert, so I am forced to write a mailmap like this:

Damien Robert <Damien.Olivier.Robert+git@gmail.com> <robert@numenor.night-elves>
Damien Robert <Damien.Olivier.Robert+git@gmail.com> <Damien.Olivier.Robert+git@gmail.com>

git shortlog -se
   281  Damien Robert <damien.olivier.robert+git@gmail.com>

```

## Andreas Schwab, 2012-11-30 13:07

Subject: Re: [Query] Can we ignore case for commiters name in shortlog?
Message-ID: <m27gp3jl2z.fsf@igel.home>
URL: https://gitlist.dev/e/m27gp3jl2z.fsf%40igel.home
In-Reply-To: <CAOh2x==NBeeoE2=PhaDC143ZF_xHKD5m=Po+-DS2X43CEeGiEQ@mail.gmail.com>

```
viresh kumar <viresh.kumar@linaro.org> writes:

> I was just thinking if we can ignore case for commiter name while
> listing stuff here?
> So, that we get over any manual mistakes from commiter.

See git-shortlog(1), section Mapping Authors.

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

```

## Viresh Kumar, 2012-11-30 15:05

Subject: Re: [Query] Can we ignore case for commiters name in shortlog?
Message-ID: <CAKohpomGKdeZ6d6_OWYrORy+Cg0yX570jLed9wxW7d+Weytuqw@mail.gmail.com>
URL: https://gitlist.dev/e/CAKohpomGKdeZ6d6_OWYrORy%2BCg0yX570jLed9wxW7d%2BWeytuqw%40mail.gmail.com
In-Reply-To: <C9C7BAF7-D552-41CF-B45D-413B9B69C054@quendi.de>

```
On 30 November 2012 16:49, Max Horn <max@quendi.de> wrote:
> I don't see how wrong case is different from any other form of misspelling. And mailmap is there precisely to handle such problems. Now, if these case issues were for some reasons very frequent, it might be worth adding dedicated support for it. But this seems dubious to me -- do you have any evidence for this? Indeed, do you have more than just the one example?

I don't have another example, but i have seen it many times. This happens
when people use different repo's to send patches and by mistake have mentioned
names in different case in them in their local .git/config files.

--
viresh

```
