Re: [PATCH] gitweb: Fix the author initials in blame for non-ASCII names
- From
Kyle J. McKay <mackyle@gmail.com>
- Date
- Aug 30, 2013, 21:39 UTC
- Message-ID
- <74435A51-B404-4EC8-8CF8-6289F49E6DBD@gmail.com>
- In-Reply-To
- <xmqqhae7yrls.fsf@gitster.dls.corp.google.com>
On Aug 30, 2013, at 11:13, Junio C Hamano wrote:
Show 23 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>>
>>> Acked-by: Jakub Narębski <jnareb@gmail.com>
>>> Tested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>>> Tested-by: Simon Ruderich <simon@ruderich.org>
>>> ---
>>> +++ b/gitweb/gitweb.perl
>>> @@ -6631,6 +6631,7 @@ sub git_blame_common {
>>> ...
>>> + binmode $fh, ':utf8';
>
>>
>> [Fri Aug 30 17:48:17 2013] gitweb.perl: Global symbol "$fh" requires
>> explicit package name at /home/gitster/w/buildfarm/next/t/../gitweb/
>> gitweb.perl line 6634.
>> [Fri Aug 30 17:48:17 2013] gitweb.perl: Execution of /home/gitster/
>> w/buildfarm/next/t/../gitweb/gitweb.perl aborted due to compilation
>> errors.
>
> I think in this function the filehandle is called $fd, not $fh. Has
> any of you really tested this???What happens if the author name is written in ISO-8859-1 instead of UTF-8 in the actual commit object itself?
I'm pretty sure I've seen this where older commits have a ISO-8859-1 author name and then newer commits have a UTF-8 version of the same author's name.
In fact, in the git repository itself, look at commit 0cb3f80d (UTF-8) and commit 7eb93c89 (ISO-8859-1) to see this in action.