[parted-devel] converting leading TABs to leading spaces: summary

Jim Meyering jim at meyering.net
Mon Mar 19 09:08:17 CET 2007


"Håkon Løvdal" <hlovdal at gmail.com> wrote:

> On 12/03/07, Jim Meyering <jim at meyering.net> wrote:
>>   # lines affected/ws-prefixed lines: 3783/31330
>>   # files affected: 76/80
>>
>>   n:  1 #unchanged: already have TAB-based indentation
>>   N:  3 #unchanged: already perfect
>>   ^: 11 #files changed to have all-spaces indentation
>>   _: 65 #files changed to have TAB-based indentation
>
> The parsing done by the script is extremely naive :) It counts
> the leading space in multi line comments as indentation which
> it is not.

On the contrary, such leading white space most definitely does count as
indentation.  What happens when you change code to increase or decrease
its indentation?  You adjust the comment lines, too, don't you?  So they
must use the same rules as the rest of the code.  Likewise, in a diff
that changes code adjacent to such a comment, you expect the adjacent
code and comment lines to appear at the same indentation level in diffs,
so they must be indented precisely the same way.



More information about the parted-devel mailing list