coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] maint: sort THANKS using our own gear


From: Pádraig Brady
Subject: Re: [PATCH] maint: sort THANKS using our own gear
Date: Wed, 11 Feb 2015 15:05:14 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 11/02/15 14:47, Bernhard Voelker wrote:
> On 02/11/2015 02:42 PM, Pádraig Brady wrote:
>> On 11/02/15 08:11, Bernhard Voelker wrote:
>> Right we need to build sort for `make dist`.
>> That would be best avoided TBH, though given we already compile
>> most of lib/ in make dist it's not too bad.
>> We should add a comment to remove when common platforms
>> have a functional sort -f.
> 
> Okay, I'll add a comment.
> 
>>>     $(AM_V_GEN)rm -f $@-t $@;                                       \
>>>     {                                                               \
>>>       $(prologue); echo;                                            \
>>> @@ -167,7 +167,7 @@ THANKS: THANKS.in Makefile.am .mailmap thanks-gen 
>>> .version
>>>         git log --pretty=format:'%aN%x00%aE'                        \
>>>           | $(ASSORT) -u;                                           \
>>>       } | $(srcdir)/thanks-gen                                      \
>>> -       | LC_ALL=en_US.UTF-8 sort -f;                               \
>>> +       | LC_ALL=en_US.UTF-8  $(srcdir)/src/sort -f -k1,1;          \
>>>       echo;                                                         \
>>>       printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:;     \
>>>     } > $@-t && chmod a-w $@-t && mv $@-t $@
>>
>> I'm wondering about the -k1,1 part.
>> Shouldn't we remove it so it sorts the surnames for same first names?
>> Same for syntax check.
> 
> Well, "sort -k1,1" uses the whole line as 2ndary key anyway.  But
> without "-k1,1" the blanks between the surnames and last names is ignored;
> this leads to "Bo" being sorted in between 2 "Bob"s:
> 
>    $ LC_ALL=en_US.UTF-8 src/sort -f file
>    Bjorn Helgaas                       ...@...com
>    Bob McCracken                       ...@...com
>    Bo Borgerson                        ...@...com
>    Bob Proulx                          ...@...com
> 
>    $ LC_ALL=en_US.UTF-8 src/sort -f -k1,1 file
>    Bjorn Helgaas                       ...@...com
>    Bo Borgerson                        ...@...com
>    Bob McCracken                       ...@...com
>    Bob Proulx                          ...@...com
> 
> I find the latter better to read.

+1.

thanks!
Pádraig.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]