<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib, branch v2.10.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.10.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.10.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-10-28T16:01:23Z</updated>
<entry>
<title>Merge branch 'jc/cocci-xstrdup-or-null' into maint</title>
<updated>2016-10-28T16:01:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-28T16:01:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=334c2a19593fa0dfb7c0636bfcd43c31bb7b4ad1'/>
<id>urn:sha1:334c2a19593fa0dfb7c0636bfcd43c31bb7b4ad1</id>
<content type='text'>
Code cleanup.

* jc/cocci-xstrdup-or-null:
  cocci: refactor common patterns to use xstrdup_or_null()
</content>
</entry>
<entry>
<title>Merge branch 'rs/cocci' into maint</title>
<updated>2016-10-28T16:01:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-28T16:01:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c8fd2201756f9cd10a796311a1b25d7a2ab2a3b9'/>
<id>urn:sha1:c8fd2201756f9cd10a796311a1b25d7a2ab2a3b9</id>
<content type='text'>
Code cleanup.

* rs/cocci:
  use strbuf_add_unique_abbrev() for adding short hashes, part 3
  remove unnecessary NULL check before free(3)
  coccicheck: make transformation for strbuf_addf(sb, "...") more precise
  use strbuf_add_unique_abbrev() for adding short hashes, part 2
  use strbuf_addstr() instead of strbuf_addf() with "%s", part 2
  gitignore: ignore output files of coccicheck make target
  use strbuf_addstr() for adding constant strings to a strbuf, part 2
  add coccicheck make target
  contrib/coccinelle: fix semantic patch for oid_to_hex_r()
</content>
</entry>
<entry>
<title>cocci: refactor common patterns to use xstrdup_or_null()</title>
<updated>2016-10-12T18:22:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-12T18:20:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13092a916d7b8211fd828a6a7ee0d3cefff995e1'/>
<id>urn:sha1:13092a916d7b8211fd828a6a7ee0d3cefff995e1</id>
<content type='text'>
d64ea0f83b ("git-compat-util: add xstrdup_or_null helper",
2015-01-12) added a handy wrapper that allows us to get a duplicate
of a string or NULL if the original is NULL, but a handful of
codepath predate its introduction or just weren't aware of it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/copy-array' into maint</title>
<updated>2016-10-11T21:18:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-11T21:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a813b19190a75e44b6ebd1ea5317ef5ed914cde0'/>
<id>urn:sha1:a813b19190a75e44b6ebd1ea5317ef5ed914cde0</id>
<content type='text'>
Code cleanup.

* rs/copy-array:
  use COPY_ARRAY
  add COPY_ARRAY
</content>
</entry>
<entry>
<title>remove unnecessary NULL check before free(3)</title>
<updated>2016-10-10T18:37:41Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-10-08T14:14:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39ea59a2570547166834ceeff9ae0c0c05748f35'/>
<id>urn:sha1:39ea59a2570547166834ceeff9ae0c0c05748f35</id>
<content type='text'>
free(3) handles NULL pointers just fine.  Add a semantic patch for
removing unnecessary NULL checks before calling this function, and
apply it on the code base.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>coccicheck: make transformation for strbuf_addf(sb, "...") more precise</title>
<updated>2016-10-03T19:20:20Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-10-02T22:58:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=353d84c537485500989b190c5af93ad224264e2c'/>
<id>urn:sha1:353d84c537485500989b190c5af93ad224264e2c</id>
<content type='text'>
We can replace strbuf_addf() calls that just add a simple string with
calls to strbuf_addstr() to make the intent clearer.  We need to be
careful if that string contains printf format specifications like %%,
though, as a simple replacement would change the output.

Add checks to the semantic patch to make sure we only perform the
transformation if the second argument is a string constant (possibly
translated) that doesn't contain any percent signs.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use strbuf_add_unique_abbrev() for adding short hashes, part 2</title>
<updated>2016-09-27T21:02:40Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-27T19:11:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f937d78553ce22505543580ae7958d9f5ffeeb89'/>
<id>urn:sha1:f937d78553ce22505543580ae7958d9f5ffeeb89</id>
<content type='text'>
Call strbuf_add_unique_abbrev() to add abbreviated hashes to strbufs
instead of taking detours through find_unique_abbrev() and its static
buffer.  This is shorter and a bit more efficient.

1eb47f167d65d1d305b9c196a1bb40eb96117cb1 already converted six cases,
this patch covers three more.

A semantic patch for Coccinelle is included for easier checking for
new cases that might be introduced in the future.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use strbuf_addstr() instead of strbuf_addf() with "%s", part 2</title>
<updated>2016-09-27T21:02:40Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-27T19:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92d52fab3af8b1d5231285ac13b364f008d1a886'/>
<id>urn:sha1:92d52fab3af8b1d5231285ac13b364f008d1a886</id>
<content type='text'>
Replace uses of strbuf_addf() for adding strings with more lightweight
strbuf_addstr() calls.  This is shorter and makes the intent clearer.

bc57b9c0cc5a123365a922fa1831177e3fd607ed already converted three cases,
this patch covers two more.

A semantic patch for Coccinelle is included for easier checking for
new cases that might be introduced in the future.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitignore: ignore output files of coccicheck make target</title>
<updated>2016-09-27T21:02:19Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-27T20:12:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f2817daef616e764afaaf302f85beb7a13e56dc'/>
<id>urn:sha1:7f2817daef616e764afaaf302f85beb7a13e56dc</id>
<content type='text'>
Helped-by: Jakub Narębski &lt;jnareb@gmail.com&gt;
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use COPY_ARRAY</title>
<updated>2016-09-25T23:44:13Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-25T07:24:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=45ccef87b3cc0ab09ec5fd1186aa0b33298ee8d4'/>
<id>urn:sha1:45ccef87b3cc0ab09ec5fd1186aa0b33298ee8d4</id>
<content type='text'>
Add a semantic patch for converting certain calls of memcpy(3) to
COPY_ARRAY() and apply that transformation to the code base.  The result
is
 shorter and safer code.  For now only consider calls where source and
destination have the same type, or in other words: easy cases.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
