Re: [PATCH 3/3] git-apply: add tests for stripping of leading and trailing whitespace
- From
- Krzysztof Halasa <khc@pm.waw.pl>
- Date
- Sep 17, 2007, 14:16 UTC
- Message-ID
- <m3myvlv0m0.fsf@maximus.localdomain>
- In-Reply-To
- <11899829421064-git-send-email-bfields@citi.umich.edu>
"J. Bruce Fields" <bfields@citi.umich.edu> writes:
> +test_expect_success \ > + '8 or more consecutive initial spaces' \ > + 'checkstrip 4'
It may be valid, some projects use tabs for indentation and spaces for alignment, e.g.:
if (cond && (cond1 || cond2)) ...
The second line is actually: cond2)) <TAB--->SSSSSSSSSSSSScond2)) where 'S' means space.
This is the only way to write code which display correctly with different tab sizes.
With tab = 4 spaces it would be expanded to:
if (cond && (cond1 ||
cond2))
...
I.e., it would be still fine.Most of the formating tools probably can't do it automatically.
-- Krzysztof Halasa