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

Re: Tabs and spaces in patches

Thread Previous | Thread Next
November 11, 2016 12:53
Re: Tabs and spaces in patches
Message ID:
I use the attached

Bascially if you say


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

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.


On 11 November 2016 at 12:37, Abigail <> 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 that discusses it.
>>> --
>>> Andy Lester =>
>> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About