threads / discuss / 32248

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

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

## tl;dr

9 messages between Nov 30, 2012 and Nov 30, 2012.

replies: 8people: 6as markdown or json

viresh kumar· Nov 30, 2012, 02:09 UTC · lore
Hi Junio and others,
I have a query. git shortlog lists the patches submitted per commiter, like:
Show 8 quoted lines
> 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· Nov 30, 2012, 03:24 UTC · re: viresh kumar · lore

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

On Thu, Nov 29, 2012 at 6:09 PM, viresh kumar <viresh.kumar@linaro.org> wrote:
Show 24 quoted lines
> 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· Nov 30, 2012, 03:32 UTC · re: David Aguilar · lore

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

On 30 November 2012 08:54, David Aguilar <davvid@gmail.com> wrote:
Show 6 quoted lines
> 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

Damien Robert· Nov 30, 2012, 13:01 UTC · re: David Aguilar · lore

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

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>
Nicolas Pitre· Nov 30, 2012, 03:33 UTC · re: viresh kumar · lore

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

On Fri, 30 Nov 2012, viresh kumar wrote:
Show 24 quoted lines
> 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· Nov 30, 2012, 03:35 UTC · re: Nicolas Pitre · lore

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

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· Nov 30, 2012, 11:19 UTC · re: Viresh Kumar · lore

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

On 30.11.2012, at 04:35, viresh kumar wrote:
Show 12 quoted lines
> 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

Viresh Kumar· Nov 30, 2012, 15:05 UTC · re: Max Horn · lore

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

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

Andreas Schwab· Nov 30, 2012, 13:07 UTC · re: viresh kumar · lore

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

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

← back to recent threads