<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/reftable, branch v2.37.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.37.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.37.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-05-20T22:26:59Z</updated>
<entry>
<title>Merge branch 'ep/maint-equals-null-cocci'</title>
<updated>2022-05-20T22:26:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-05-20T22:26:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=538dc459a0331c48b893c9f6ca0be5917860bb99'/>
<id>urn:sha1:538dc459a0331c48b893c9f6ca0be5917860bb99</id>
<content type='text'>
Introduce and apply coccinelle rule to discourage an explicit
comparison between a pointer and NULL, and applies the clean-up to
the maintenance track.

* ep/maint-equals-null-cocci:
  tree-wide: apply equals-null.cocci
  tree-wide: apply equals-null.cocci
  contrib/coccinnelle: add equals-null.cocci
</content>
</entry>
<entry>
<title>Merge branch 'cm/reftable-0-length-memset'</title>
<updated>2022-05-04T16:51:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-05-04T16:51:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c4411cce1bfc515cba4c1ca63b7d616e023b5e1'/>
<id>urn:sha1:1c4411cce1bfc515cba4c1ca63b7d616e023b5e1</id>
<content type='text'>
Code clean-up.

* cm/reftable-0-length-memset:
  reftable: avoid undefined behaviour breaking t0032
</content>
</entry>
<entry>
<title>tree-wide: apply equals-null.cocci</title>
<updated>2022-05-02T17:09:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-05-02T17:09:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=72a4ea71e5f29e4078363e87e4471128ff713a62'/>
<id>urn:sha1:72a4ea71e5f29e4078363e87e4471128ff713a62</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: avoid undefined behaviour breaking t0032</title>
<updated>2022-04-15T16:24:02Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2022-04-15T08:30:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e6b2582da30b599d95f40510777c643b9fba9012'/>
<id>urn:sha1:e6b2582da30b599d95f40510777c643b9fba9012</id>
<content type='text'>
1214aa841bc (reftable: add blocksource, an abstraction for random
access reads, 2021-10-07), makes the assumption that it is ok to
free a reftable_block pointing to NULL if the size is also set to
0, but implements that using a memset call that at least in glibc
based system will trigger a runtime exception if called with a
NULL pointer as its first parameter.

Avoid doing so by adding a conditional to check for the size in all
three identically looking functions that were affected, and therefore,
still allow memset to help catch callers that might incorrectly pass
a NULL pointer with a non zero size, but avoiding the exception for
the valid cases.

Signed-off-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>reftable: make assignments portable to AIX xlc v12.01</title>
<updated>2022-03-28T20:58:10Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-03-28T19:10:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=33665d98e6bff90896ec5b9f8e8f1223b780a4d1'/>
<id>urn:sha1:33665d98e6bff90896ec5b9f8e8f1223b780a4d1</id>
<content type='text'>
Change the assignment syntax introduced in 66c0dabab5e (reftable: make
reftable_record a tagged union, 2022-01-20) to be portable to AIX xlc
v12.1:

    avar@gcc111:[/home/avar]xlc -qversion
    IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72)
    Version: 12.01.0000.0000

The error emitted before this was e.g.:

    "reftable/generic.c", line 133.26: 1506-196 (S) Initialization
    between types "char*" and "struct reftable_ref_record" is not
    allowed.

The syntax in the pre-image is supported by e.g. xlc 13.01 on a newer
AIX version:

    avar@gcc119:[/home/avar]xlc -qversion
    IBM XL C/C++ for AIX, V13.1.3 (5725-C72, 5765-J07)
    Version: 13.01.0003.0006

But as we've otherwise supported this compiler let's not break it
entirely if it's easy to work around it.

Suggested-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: rename writer_stats to reftable_writer_stats</title>
<updated>2022-02-23T21:36:26Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-02-21T18:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=73a4c188b77acbfdf25641e2bb4d1600c45338ec'/>
<id>urn:sha1:73a4c188b77acbfdf25641e2bb4d1600c45338ec</id>
<content type='text'>
This function is part of the reftable API, so it should use the
reftable_ prefix

Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: add test for length of disambiguating prefix</title>
<updated>2022-02-23T21:36:26Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-02-21T18:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3c443a02a9f98227fa5c22935d88bcf68cfeaeec'/>
<id>urn:sha1:3c443a02a9f98227fa5c22935d88bcf68cfeaeec</id>
<content type='text'>
The ID =&gt; ref map is trimming object IDs to a disambiguating prefix.
Check that we are computing their length correctly.

Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: ensure that obj_id_len is &gt;= 2 on writing</title>
<updated>2022-02-23T21:36:26Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-02-21T18:46:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4007fcc6fe04deeeb3cdf7b018413f65c9de6e8'/>
<id>urn:sha1:b4007fcc6fe04deeeb3cdf7b018413f65c9de6e8</id>
<content type='text'>
When writing the same hash many times, we might decide to use a
length-1 object ID prefix for the ObjectID =&gt; ref table, which is out
of spec.

Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: avoid writing empty keys at the block layer</title>
<updated>2022-02-23T21:36:26Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-02-21T18:46:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=45c2fcc2a0659e42c7e4f21f0b97393df261ca51'/>
<id>urn:sha1:45c2fcc2a0659e42c7e4f21f0b97393df261ca51</id>
<content type='text'>
The public interface (reftable_writer) already ensures that keys are
written in strictly increasing order, and an empty key by definition
fails this check.

However, by also enforcing this at the block layer, it is easier to
verify that records (which are written into blocks) never have to
consider the possibility of empty keys.

Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: add a test that verifies that writing empty keys fails</title>
<updated>2022-02-23T21:36:26Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-02-21T18:46:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=140765911050d62a23503972ef6513ef18252ad3'/>
<id>urn:sha1:140765911050d62a23503972ef6513ef18252ad3</id>
<content type='text'>
Empty keys can only be written as ref records with empty names. The
log record has a logical timestamp in the key, so the key is never
empty.

Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
