Re: [PATCH 3/3] git-apply: add tests for stripping of leading and trailing whitespace

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 3/3] git-apply: add tests for stripping of leading and trailing whitespace

From: Krzysztof Halasa <khc@pm.waw.pl>
Date: 2016-06-15 22:43:35

"J. Bruce Fields" [off-list ref] 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

Re: [PATCH 3/3] git-apply: add tests for stripping of leading and trailing whitespace

From: J. Bruce Fields <hidden>
Date: 2016-06-15 22:43:35

On Mon, Sep 17, 2007 at 04:16:07PM +0200, Krzysztof Halasa wrote:
"J. Bruce Fields" [off-list ref] writes:
quoted
+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.:
Yeah, I know.  I was hoping that the stripspace behavior was already
specific enough to the linux-kernel style that we could just assume that 
it was only used by developers on projects with the same style.  I agree
that I was wrong--apologies.

--b.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help