<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ws.c, branch v1.6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-07-25T08:29:20Z</updated>
<entry>
<title>Fix severe breakage in "git-apply --whitespace=fix"</title>
<updated>2009-07-25T08:29:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-07-25T08:29:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=422a82f21370fe38b3e926a83b460bf2b1dd13ab'/>
<id>urn:sha1:422a82f21370fe38b3e926a83b460bf2b1dd13ab</id>
<content type='text'>
735c674 (Trailing whitespace and no newline fix, 2009-07-22) completely
broke --whitespace=fix, causing it to lose all the empty lines in a patch.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Trailing whitespace and no newline fix</title>
<updated>2009-07-23T01:54:55Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder@ira.uka.de</email>
</author>
<published>2009-07-23T00:24:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=735c674416b87505400fcf738fd3a38b52f0eccb'/>
<id>urn:sha1:735c674416b87505400fcf738fd3a38b52f0eccb</id>
<content type='text'>
If a patch adds a new line to the end of a file and this line ends with
one trailing whitespace character and has no newline, then
'--whitespace=fix' currently does not remove that trailing whitespace.

This patch fixes this by removing the check for trailing whitespace at
the end of the line at a hardcoded offset which does not take the
eventual absence of newline into account.

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>attribute: whitespace set to true detects all errors known to git</title>
<updated>2009-06-21T17:43:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-06-21T09:35:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a437900fd7643408e1d7a130b4a6b81bfd816d4e'/>
<id>urn:sha1:a437900fd7643408e1d7a130b4a6b81bfd816d4e</id>
<content type='text'>
That is what the documentation says, but the code pretends as if all the
known whitespace error tokens were given.

Among the whitespace error tokens, there is one kind that loosens the rule
when set: cr-at-eol.  Which means that whitespace error token that is set
to true ignores a newly introduced CR at the end, which is inconsistent
with the documentation.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Replace calls to strbuf_init(&amp;foo, 0) with STRBUF_INIT initializer</title>
<updated>2008-10-12T19:36:19Z</updated>
<author>
<name>Brandon Casey</name>
<email>casey@nrlssc.navy.mil</email>
</author>
<published>2008-10-09T19:12:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f285a2d7ed6548666989406de8f0e7233eb84368'/>
<id>urn:sha1:f285a2d7ed6548666989406de8f0e7233eb84368</id>
<content type='text'>
Many call sites use strbuf_init(&amp;foo, 0) to initialize local
strbuf variable "foo" which has not been accessed since its
declaration. These can be replaced with a static initialization
using the STRBUF_INIT macro which is just as readable, saves a
function call, and takes up fewer lines.

Signed-off-by: Brandon Casey &lt;casey@nrlssc.navy.mil&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>Teach "diff --check" about new blank lines at end</title>
<updated>2008-06-27T05:07:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-06-26T22:36:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=877f23ccb88227203f2576abdfb5d1c15925fcb3'/>
<id>urn:sha1:877f23ccb88227203f2576abdfb5d1c15925fcb3</id>
<content type='text'>
When a patch adds new blank lines at the end, "git apply --whitespace"
warns.  This teaches "diff --check" to do the same.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>check_and_emit_line(): rename and refactor</title>
<updated>2008-06-27T01:13:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-06-26T22:35:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8f8841e9c8e6a26153b0cf9417c7540cf65ef09f'/>
<id>urn:sha1:8f8841e9c8e6a26153b0cf9417c7540cf65ef09f</id>
<content type='text'>
The function name was too bland and not explicit enough as to what it is
checking.  Split it into two, and call the one that checks if there is a
whitespace breakage "ws_check()", and call the other one that checks and
emits the line after color coding "ws_check_emit()".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-apply --whitespace=fix: fix off by one thinko</title>
<updated>2008-02-26T20:24:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-02-26T20:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c6fabfafbcebca13cee0047b337b7c7a87e3515e'/>
<id>urn:sha1:c6fabfafbcebca13cee0047b337b7c7a87e3515e</id>
<content type='text'>
When a patch adds a whitespace followed by end-of-line, the
trailing whitespace error was detected correctly but was not
fixed, due to misconversion in 42ab241 (builtin-apply.c: do not
feed copy_wsfix() leading '+').

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ws_fix_copy(): move the whitespace fixing function to ws.c</title>
<updated>2008-02-24T00:59:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-02-24T00:59:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe3403c3205de44faa926a086b4b99f157fc63fe'/>
<id>urn:sha1:fe3403c3205de44faa926a086b4b99f157fc63fe</id>
<content type='text'>
This is used by git-apply but we can use it elsewhere by slightly
generalizing it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>core.whitespace: cr-at-eol</title>
<updated>2008-02-05T08:38:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-01-15T08:59:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2979ff599a6bcf9dbf5e2ef1e32b81a1b88e115'/>
<id>urn:sha1:b2979ff599a6bcf9dbf5e2ef1e32b81a1b88e115</id>
<content type='text'>
This new error mode allows a line to have a carriage return at the
end of the line when checking and fixing trailing whitespace errors.

Some people like to keep CRLF line ending recorded in the repository,
and still want to take advantage of the automated trailing whitespace
stripping.  We still show ^M in the diff output piped to "less" to
remind them that they do have the CR at the end, but these carriage
return characters at the end are no longer flagged as errors.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>whitespace: more accurate initial-indent highlighting</title>
<updated>2007-12-16T21:07:58Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@citi.umich.edu</email>
</author>
<published>2007-12-16T16:31:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffe568859ba89b4283afc36251561a9be3173bf8'/>
<id>urn:sha1:ffe568859ba89b4283afc36251561a9be3173bf8</id>
<content type='text'>
Instead of highlighting the entire initial indent, highlight only the
problematic spaces.

In the case of an indent like ' \t \t' there may be multiple problematic
ranges, so it's easiest to emit the highlighting as we go instead of
trying rember disjoint ranges and do it all at the end.

Signed-off-by: J. Bruce Fields &lt;bfields@citi.umich.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
