<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ws.c, branch v1.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-04-04T21:21:54Z</updated>
<entry>
<title>whitespace: add tab-in-indent support for --whitespace=fix</title>
<updated>2010-04-04T21:21:54Z</updated>
<author>
<name>Chris Webb</name>
<email>chris@arachsys.com</email>
</author>
<published>2010-04-02T23:37:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e35c51e5113e83155a6c44a8f9adeafed9125d2'/>
<id>urn:sha1:4e35c51e5113e83155a6c44a8f9adeafed9125d2</id>
<content type='text'>
If tab-in-indent is set, --whitespace=fix will ensure that any stray tabs in
the initial indent are expanded to the correct number of space characters.

Signed-off-by: Chris Webb &lt;chris@arachsys.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dst</title>
<updated>2010-04-04T21:21:54Z</updated>
<author>
<name>Chris Webb</name>
<email>chris@arachsys.com</email>
</author>
<published>2010-04-02T23:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d511bd330d66fe8f0be21855888e30af2f3e373b'/>
<id>urn:sha1:d511bd330d66fe8f0be21855888e30af2f3e373b</id>
<content type='text'>
To implement --whitespace=fix for tab-in-indent, we have to allow for the
possibility that whitespace can increase in size when it is fixed, expanding
tabs to to multiple spaces in the initial indent.

Signed-off-by: Chris Webb &lt;chris@arachsys.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>whitespace: add tab-in-indent error class</title>
<updated>2010-04-03T04:08:04Z</updated>
<author>
<name>Chris Webb</name>
<email>chris@arachsys.com</email>
</author>
<published>2010-04-02T23:37:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e3ec2abe0f275dda285e989224e4c3da19e7adb'/>
<id>urn:sha1:3e3ec2abe0f275dda285e989224e4c3da19e7adb</id>
<content type='text'>
Some projects and languages use coding style where no tab character is used to
indent the lines.

This only adds support and documentation for "apply --whitespace=warn" and
"diff --check"; later patches add "apply --whitespace=fix" and tests.

Signed-off-by: Chris Webb &lt;chris@arachsys.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>whitespace: we cannot "catch all errors known to git" anymore</title>
<updated>2010-04-03T04:07:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-04-02T23:37:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=727c3718a51605a2b93a7b2ac57e0175decc122a'/>
<id>urn:sha1:727c3718a51605a2b93a7b2ac57e0175decc122a</id>
<content type='text'>
Traditionally, "*.txt whitespace" in .gitattributes file has been an
instruction to catch _all_ classes of whitespace errors known to git.

This has to change, however, in order to introduce "tab-in-indent" which
is inherently incompatible with "indent-with-non-tab".  As we do not want
to break configuration of existing users, add a mechanism to allow marking
selected rules to be excluded from "all rules known to git".

Signed-off-by: Chris Webb &lt;chris@arachsys.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git_attr(): fix function signature</title>
<updated>2010-01-17T04:39:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-17T04:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7fb0eaa289576a1dcd7751015ba791f1bce778a9'/>
<id>urn:sha1:7fb0eaa289576a1dcd7751015ba791f1bce778a9</id>
<content type='text'>
The function took (name, namelen) as its arguments, but all the public
callers wanted to pass a full string.

Demote the counted-string interface to an internal API status, and allow
public callers to just pass the string to the function.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/maint-1.6.0-blank-at-eof' (early part) into jc/maint-blank-at-eof</title>
<updated>2009-09-15T10:28:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-09-15T10:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=afd9db4173b99fb2fb103ec604498896a6bedaa7'/>
<id>urn:sha1:afd9db4173b99fb2fb103ec604498896a6bedaa7</id>
<content type='text'>
* 'jc/maint-1.6.0-blank-at-eof' (early part):
  diff --whitespace: fix blank lines at end
  core.whitespace: split trailing-space into blank-at-{eol,eof}
  diff --color: color blank-at-eof
  diff --whitespace=warn/error: fix blank-at-eof check
  diff --whitespace=warn/error: obey blank-at-eof
  diff.c: the builtin_diff() deals with only two-file comparison
  apply --whitespace: warn blank but not necessarily empty lines at EOF
  apply --whitespace=warn/error: diagnose blank at EOF
  apply.c: split check_whitespace() into two
  apply --whitespace=fix: detect new blank lines at eof correctly
  apply --whitespace=fix: fix handling of blank lines at the eof
</content>
</entry>
<entry>
<title>core.whitespace: split trailing-space into blank-at-{eol,eof}</title>
<updated>2009-09-06T06:14:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-09-06T05:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aeb84b05ae448596c336807631d9633492b3049a'/>
<id>urn:sha1:aeb84b05ae448596c336807631d9633492b3049a</id>
<content type='text'>
People who configured trailing-space depended on it to catch both extra
white space at the end of line, and extra blank lines at the end of file.
Earlier attempt to introduce only blank-at-eof gave them an escape hatch
to keep the old behaviour, but it is a regression until they explicitly
specify the new error class.

This introduces a blank-at-eol that only catches extra white space at the
end of line, and makes the traditional trailing-space a convenient synonym
to catch both blank-at-eol and blank-at-eof.  This way, people who used
trailing-space continue to catch both classes of errors.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply --whitespace=warn/error: diagnose blank at EOF</title>
<updated>2009-09-04T18:50:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-09-03T23:02:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77b15bbd88e2f48de093ff0e60de6dbc11e3329e'/>
<id>urn:sha1:77b15bbd88e2f48de093ff0e60de6dbc11e3329e</id>
<content type='text'>
"git apply" strips new blank lines at EOF under --whitespace=fix option,
but neigher --whitespace=warn nor --whitespace=error paid any attention to
these errors.

Introduce a new whitespace error class, blank-at-eof, to make the
whitespace error handling more consistent.

The patch adds a new "linenr" field to the struct fragment in order to
record which line the hunk started in the input file, but this is needed
solely for reporting purposes.  The detection of this class of whitespace
errors cannot be done while parsing a patch like we do for all the other
classes of whitespace errors.  It instead has to wait until we find where
to apply the hunk, but at that point, we do not have an access to the
original line number in the input file anymore, hence the new field.

Depending on your point of view, this may be a bugfix that makes warn and
error in line with fix.  Or you could call it a new feature.  The line
between them is somewhat fuzzy in this case.

Strictly speaking, triggering more errors than before is a change in
behaviour that is not backward compatible, even though the reason for the
change is because the code was not checking for an error that it should
have.  People who do not want added blank lines at EOF to trigger an error
can disable the new error class.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
