<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/CodingGuidelines, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-05-11T06:27:22Z</updated>
<entry>
<title>Merge branch 'jc/test-allows-local'</title>
<updated>2021-05-11T06:27:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-11T06:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b77301bf4c8e3b37beee0b5c8dcf26beaa6e789'/>
<id>urn:sha1:0b77301bf4c8e3b37beee0b5c8dcf26beaa6e789</id>
<content type='text'>
Document that our test can use "local" keyword.

* jc/test-allows-local:
  CodingGuidelines: explicitly allow "local" for test scripts
</content>
</entry>
<entry>
<title>CodingGuidelines: explicitly allow "local" for test scripts</title>
<updated>2021-05-03T05:24:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-03T05:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a84fd3bcc6253f847af3366ebb9de9b8f441a624'/>
<id>urn:sha1:a84fd3bcc6253f847af3366ebb9de9b8f441a624</id>
<content type='text'>
01d3a526 (t0000: check whether the shell supports the "local"
keyword, 2017-10-26) raised a test balloon to see if those who build
and test Git use a platform with a shell that lacks support for the
"local" keyword.  After two years, 7f0b5908 (t0000: reword comments
for "local" test, 2019-08-08) documented that "local" keyword, even
though is outside POSIX, is allowed in our test scripts.

Let's write it in the CodingGuidelines, too.  It might be tempting
to allow it in scripted Porcelains (we have avoided getting them
contaminiated by "local" so far), but they are on their way out and
getting rewritten in C.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: clarify "do not capitalize the first word" rule</title>
<updated>2021-04-15T06:41:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-14T23:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=151b6c2dd7d040bd053911e4fd4b3e5cc6f17c83'/>
<id>urn:sha1:151b6c2dd7d040bd053911e4fd4b3e5cc6f17c83</id>
<content type='text'>
The same "do not capitalize the first word" rule is applied to both
our patch titles and error messages, but the existing description
was fuzzy in two aspects.

 * For error messages, it was not said that this was only about the
   first word that begins the sentence.

 * For both, it was not clear when a capital letter there was not an
   error.  We avoid capitalizing the first word when the only reason
   you would capitalize it is because it happens to be the first
   word in the sentence.  If a proper noun, which is usually spelled
   in capital letters, happens to come at the beginning of the
   sentence, it should be kept in capital letters.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dl/python-2.7-is-the-floor-version'</title>
<updated>2020-06-18T04:54:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-06-18T04:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6361eb73c6dc147e94b02673f387c0345d8d15d2'/>
<id>urn:sha1:6361eb73c6dc147e94b02673f387c0345d8d15d2</id>
<content type='text'>
Document that we do not support Python 2.6 or older.

* dl/python-2.7-is-the-floor-version:
  CodingGuidelines: specify Python 2.7 is the oldest version
</content>
</entry>
<entry>
<title>CodingGuidelines: specify Python 2.7 is the oldest version</title>
<updated>2020-06-08T17:32:42Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2020-06-07T10:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=45a87a83bb5eb146816bc98026fafaa9d912fc92'/>
<id>urn:sha1:45a87a83bb5eb146816bc98026fafaa9d912fc92</id>
<content type='text'>
In 0b4396f068 (git-p4: make python2.7 the oldest supported version,
2019-12-13), git-p4 was updated to only support 2.7 and newer. Since
Python 2.6 is pretty much ancient history, update CodingGuidelines to
show that 2.7 is the oldest version supported.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/codingstyle-compare-with-null'</title>
<updated>2020-05-14T21:39:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-05-14T21:39:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=73d9f96b4790e16335a30380f97d46bd065dc07b'/>
<id>urn:sha1:73d9f96b4790e16335a30380f97d46bd065dc07b</id>
<content type='text'>
Doc update.

* jc/codingstyle-compare-with-null:
  CodingGuidelines: do not ==/!= compare with 0 or '\0' or NULL
</content>
</entry>
<entry>
<title>Merge branch 'jk/arith-expansion-coding-guidelines'</title>
<updated>2020-05-08T21:25:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-05-08T21:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6d4bf5813cd2c1a3b93fd4f0b231733f82133cce'/>
<id>urn:sha1:6d4bf5813cd2c1a3b93fd4f0b231733f82133cce</id>
<content type='text'>
The coding guideline for shell scripts instructed to refer to a
variable with dollar-sign inside arithmetic expansion to work
around a bug in old versions of dash, which is a thing of the past.
Now we are not forbidden from writing $((var+1)).

* jk/arith-expansion-coding-guidelines:
  CodingGuidelines: drop arithmetic expansion advice to use "$x"
</content>
</entry>
<entry>
<title>CodingGuidelines: do not ==/!= compare with 0 or '\0' or NULL</title>
<updated>2020-05-08T18:25:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-05-08T17:51:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5c7bb0146e1971a00308a667cb0424459262c273'/>
<id>urn:sha1:5c7bb0146e1971a00308a667cb0424459262c273</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>CodingGuidelines: drop arithmetic expansion advice to use "$x"</title>
<updated>2020-05-04T19:36:07Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-05-04T16:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=32b5fe7f0e2cb798954b3e01b990bc140706e191'/>
<id>urn:sha1:32b5fe7f0e2cb798954b3e01b990bc140706e191</id>
<content type='text'>
The advice to use "$x" rather than "x" in arithmetric expansion was
working around a dash bug fixed in 0.5.4. Even Debian oldstable has
0.5.8 these days. And in the meantime, we've added almost two dozen
instances of the "x" form which you can find with:

  git grep '$(([a-z]'

and nobody seems to have complained. Let's declare this workaround
obsolete and simplify our style guide.

Helped-by: Danh Doan &lt;congdanhqx@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Reviewed-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/allow-strlen-substitution-in-shell-scripts'</title>
<updated>2020-04-22T20:42:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-04-22T20:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d28d691749a9c37aa1f490454f1d2c8a285e672'/>
<id>urn:sha1:7d28d691749a9c37aa1f490454f1d2c8a285e672</id>
<content type='text'>
Coding guideline update.

* jc/allow-strlen-substitution-in-shell-scripts:
  CodingGuidelines: allow ${#posix} == strlen($posix)
</content>
</entry>
</feed>
