develooper Front page | perl.perl5.porters | Postings from November 2016

Re: Tabs and spaces in patches

Thread Previous | Thread Next
From:
demerphq
Date:
November 11, 2016 12:53
Subject:
Re: Tabs and spaces in patches
Message ID:
CANgJU+UBKzcyWu0-5NHc-8njV+O4AF9yOHPUjWdO3qupAsta=g@mail.gmail.com
I use the attached

Bascially if you say

clean-commit

It find all modified files, uses blame to find the lines you changed,
and then fixes whitespace only on those lines. (Only on .c or .pl
files).

Not super proud of the script. But never had the urge to rewrite it.
Junio on the git list has a pure git oneliner that does the same thing
but faster.

Yves


On 11 November 2016 at 12:37, Abigail <abigail@abigail.be> wrote:
> On Sun, Oct 09, 2016 at 08:47:56PM -0600, Karl Williamson wrote:
>> On 10/09/2016 04:52 PM, Andy Lester wrote:
>>> Are we migrating C source to tabs or spaces or do we not care?
>>>
>>> I have a patch.  Some of the lines I have changed were originally indented with tabs.  Some were indented with spaces.
>>>
>>> Should I:
>>>
>>> A) Change all the modified lines in my patch that are indented with tabs to be indented with spaces
>>> B) Change all the modified lines in my patch that are indented with spaces to be indented with tabs
>>> C) Don't change how any of the lines are indented
>>>
>>> I don't see anything in http://perldoc.perl.org/perlhack.html that discusses it.
>>>
>>> --
>>> Andy Lester => www.petdance.com
>>>
>>>
>>
>> I don't know where it's discussed, but we are migrating to all spaces,
>> no tabs
>
>
> It doesn't seem to be hard to write a script which takes care of
> converting all leading tabs to spaces.
>
> Is there an argument I shouldn't make a patch changing all leading
> tabs to spaces?
>
>
>
> Abigail



-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About