<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/Documentation/CodingGuidelines, branch v1.7.3.5</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.3.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.3.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2010-12-03T23:22:59Z</updated>
<entry>
<title>CodingGuidelines: mention whitespace preferences for shell scripts</title>
<updated>2010-12-03T23:22:59Z</updated>
<author>
<name>Giuseppe Bilotta</name>
<email>giuseppe.bilotta@gmail.com</email>
</author>
<published>2010-12-03T16:47:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f36a4fa8ef611c37c890ed21a388a5ece801a3de'/>
<id>urn:sha1:f36a4fa8ef611c37c890ed21a388a5ece801a3de</id>
<content type='text'>
Signed-off-by: Giuseppe Bilotta &lt;giuseppe.bilotta@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>CodingGuidelines: reword parameter expansion section</title>
<updated>2010-10-13T18:15:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-10-13T18:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=bc979945305b87caf1e5975d30d42bafd88ad846'/>
<id>urn:sha1:bc979945305b87caf1e5975d30d42bafd88ad846</id>
<content type='text'>
Group entries related to parameter substitutions together and avoid
using the word "regexp" to refer to the ${parameter/pattern/string}
substitution (banned), as the pattern there is a shell glob and not
a regular expression.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>CodingGuidelines: spell Arithmetic Expansion with $(($var))</title>
<updated>2010-09-27T17:45:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-09-22T19:15:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=055467dd4ae7fac2cf3149352710a5ee64b2138c'/>
<id>urn:sha1:055467dd4ae7fac2cf3149352710a5ee64b2138c</id>
<content type='text'>
POSIX wants shells to support both "N" and "$N" and requires them to yield
the same answer to $((N)) and $(($N)), but we should aim for portability
in a case like this, especially when the price we pay to do so is so
small, i.e. a few extra dollars.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>lstat_cache(): swap func(length, string) into func(string, length)</title>
<updated>2009-02-10T04:59:26Z</updated>
<author>
<name>Kjetil Barvik</name>
<email>barvik@broadpark.no</email>
</author>
<published>2009-02-09T20:54:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=571998921d8fd4ee674545406aabb86987921252'/>
<id>urn:sha1:571998921d8fd4ee674545406aabb86987921252</id>
<content type='text'>
Swap function argument pair (length, string) into (string, length) to
conform with the commonly used order inside the GIT source code.

Also, add a note about this fact into the coding guidelines.

Signed-off-by: Kjetil Barvik &lt;barvik@broadpark.no&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Mention "local convention" rule in the CodingGuidelines</title>
<updated>2009-01-26T08:35:58Z</updated>
<author>
<name>Nanako Shiraishi</name>
<email>nanako3@lavabit.com</email>
</author>
<published>2009-01-26T08:32:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=dfb047b9e4f7f66c5322ef642f21fd92b0a975e3'/>
<id>urn:sha1:dfb047b9e4f7f66c5322ef642f21fd92b0a975e3</id>
<content type='text'>
The document suggests to imitate the existing code, but didn't
say which existing code it should imitate. This clarifies.

Signed-off-by: しらいしななこ &lt;nanako3@lavabit.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Rename path_list to string_list</title>
<updated>2008-07-22T02:11:50Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>Johannes.Schindelin@gmx.de</email>
</author>
<published>2008-07-21T18:03:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c455c87c5cd42bbbe586b31cea1143132f3a39e4'/>
<id>urn:sha1:c455c87c5cd42bbbe586b31cea1143132f3a39e4</id>
<content type='text'>
The name path_list was correct for the first usage of that data structure,
but it really is a general-purpose string list.

$ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list)
$ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list)
$ git mv path-list.h string-list.h
$ git mv path-list.c string-list.c
$ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path)
$ perl -i -pe 's/path/string/g' string-list.[ch]
$ git mv Documentation/technical/api-path-list.txt \
	Documentation/technical/api-string-list.txt
$ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths)

... and then fix all users of string-list to access the member "string"
instead of "path".

Documentation/technical/api-string-list.txt needed some rewrapping, too.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>CodingGuidelines: Add a note to avoid assignments inside if()</title>
<updated>2008-05-25T05:13:19Z</updated>
<author>
<name>Miklos Vajna</name>
<email>vmiklos@frugalware.org</email>
</author>
<published>2008-05-22T23:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0b0b8cd7c2c3df72fc3959805b035e55e1bb1270'/>
<id>urn:sha1:0b0b8cd7c2c3df72fc3959805b035e55e1bb1270</id>
<content type='text'>
Signed-off-by: Miklos Vajna &lt;vmiklos@frugalware.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>CodingGuidelines: spell out how we use grep in our scripts</title>
<updated>2008-03-02T02:18:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-03-02T02:18:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=009c98ee170b36598548cc67c54826544cced108'/>
<id>urn:sha1:009c98ee170b36598548cc67c54826544cced108</id>
<content type='text'>
Our scripts try to stick to fairly limited subset of POSIX BRE for
portability.  It is unclear from manual page from GNU grep which is GNU
extension and which is portable, so let's spell it out to help new people
to keep their contributions from hurting porters.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add Documentation/CodingGuidelines</title>
<updated>2007-11-08T01:05:53Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>Johannes.Schindelin@gmx.de</email>
</author>
<published>2007-11-08T00:33:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6d0618a820a20846d60b665897fcce600f452eec'/>
<id>urn:sha1:6d0618a820a20846d60b665897fcce600f452eec</id>
<content type='text'>
Even if our code is quite a good documentation for our coding style,
some people seem to prefer a document describing it.

The part about the shell scripts is clearly just copied from one of
Junio's helpful mails, and some parts were added from comments by
Junio, Andreas Ericsson and Robin Rosenberg.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
