<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/reftable/record_test.c, branch v2.40.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-03-28T20:58:10Z</updated>
<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: add print functions to the record types</title>
<updated>2022-01-20T19:31:53Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-01-20T15:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=01033de49f26b75afd1e868d56c332c60b141faa'/>
<id>urn:sha1:01033de49f26b75afd1e868d56c332c60b141faa</id>
<content type='text'>
This isn't used per se, but it is useful for debugging, especially
Windows CI failures.

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: make reftable_record a tagged union</title>
<updated>2022-01-20T19:31:53Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-01-20T15:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66c0dabab5e15f78d0505be36cac4a383e14cf88'/>
<id>urn:sha1:66c0dabab5e15f78d0505be36cac4a383e14cf88</id>
<content type='text'>
This reduces the amount of glue code, because we don't need a void
pointer or vtable within the structure.

The only snag is that reftable_index_record contain a strbuf, so it
cannot be zero-initialized. To address this, use reftable_new_record()
to return fresh instance, given a record type. Since
reftable_new_record() doesn't cause heap allocation anymore, it should
be balanced with reftable_record_release() rather than
reftable_record_destroy().

Thanks to Peff for the suggestion.

Helped-by: Jeff King &lt;peff@peff.net&gt;
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: implement record equality generically</title>
<updated>2022-01-20T19:31:53Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-01-20T15:12:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c983374035bcba0f70d8908d735d17dfef4e0edf'/>
<id>urn:sha1:c983374035bcba0f70d8908d735d17dfef4e0edf</id>
<content type='text'>
This simplifies unittests a little, and provides further coverage for
reftable_record_copy().

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: (de)serialization for the polymorphic record type.</title>
<updated>2021-10-08T17:45:48Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2021-10-07T20:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e303bf22f9ac1a3bf0cb384ecd925570e014a3f3'/>
<id>urn:sha1:e303bf22f9ac1a3bf0cb384ecd925570e014a3f3</id>
<content type='text'>
The reftable format is structured as a sequence of blocks, and each block
contains a sequence of prefix-compressed key-value records. There are 4 types of
records, and they have similarities in how they must be handled. This is
achieved by introducing a polymorphic 'record' type that encapsulates ref, log,
index and object records.

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>
