<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/reftable/reader.c, branch v2.43.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.43.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.43.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-02-09T00:22:10Z</updated>
<entry>
<title>Merge branch 'en/header-cleanup' into maint-2.43</title>
<updated>2024-02-09T00:22:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-09T00:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f7a10a3aad344a28f0f30b32a979925a9629533'/>
<id>urn:sha1:0f7a10a3aad344a28f0f30b32a979925a9629533</id>
<content type='text'>
Remove unused header "#include".

* en/header-cleanup:
  treewide: remove unnecessary includes in source files
  treewide: add direct includes currently only pulled in transitively
  trace2/tr2_tls.h: remove unnecessary include
  submodule-config.h: remove unnecessary include
  pkt-line.h: remove unnecessary include
  line-log.h: remove unnecessary include
  http.h: remove unnecessary include
  fsmonitor--daemon.h: remove unnecessary includes
  blame.h: remove unnecessary includes
  archive.h: remove unnecessary include
  treewide: remove unnecessary includes in source files
  treewide: remove unnecessary includes from header files
</content>
</entry>
<entry>
<title>treewide: remove unnecessary includes in source files</title>
<updated>2023-12-26T20:04:31Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-12-23T17:14:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eea0e59ffbed6e33d171ace5be13cde9faa41639'/>
<id>urn:sha1:eea0e59ffbed6e33d171ace5be13cde9faa41639</id>
<content type='text'>
Each of these were checked with
   gcc -E -I. ${SOURCE_FILE} | grep ${HEADER_FILE}
to ensure that removing the direct inclusion of the header actually
resulted in that header no longer being included at all (i.e. that
no other header pulled it in transitively).

...except for a few cases where we verified that although the header
was brought in transitively, nothing from it was directly used in
that source file.  These cases were:
  * builtin/credential-cache.c
  * builtin/pull.c
  * builtin/send-pack.c

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable/block: introduce macro to initialize `struct block_iter`</title>
<updated>2023-12-11T15:23:17Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2023-12-11T09:08:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a8305bc6d8eb55cf52264964c8fc0289b72f2fd8'/>
<id>urn:sha1:a8305bc6d8eb55cf52264964c8fc0289b72f2fd8</id>
<content type='text'>
There are a bunch of locations where we initialize members of `struct
block_iter`, which makes it harder than necessary to expand this struct
to have additional members. Unify the logic via a new `BLOCK_ITER_INIT`
macro that initializes all members.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: drop unused parameter from reader_seek_linear()</title>
<updated>2022-08-20T21:14:55Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2022-08-19T08:54:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=21a40847ed4a5ec96b0d9cc87b3fe406e7f8f904'/>
<id>urn:sha1:21a40847ed4a5ec96b0d9cc87b3fe406e7f8f904</id>
<content type='text'>
The reader code passes around a "struct reftable_reader" context
variable. But the seek function doesn't need it; the table iterator we
already get is sufficient.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: reject 0 object_id_len</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:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eff5832ba13b81ebbf68b0c28934fe18ba8601fc'/>
<id>urn:sha1:eff5832ba13b81ebbf68b0c28934fe18ba8601fc</id>
<content type='text'>
The spec says 2 &lt;= object_id_len &lt;= 31. We are lenient and allow 1,
but we forbid 0, so we can be sure that we never read a 0-length key.

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: all xxx_free() functions accept NULL arguments</title>
<updated>2022-01-20T19:31:52Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-01-20T15:12:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=33e922432016f614327bcf5624c084b7c02fe9c3'/>
<id>urn:sha1:33e922432016f614327bcf5624c084b7c02fe9c3</id>
<content type='text'>
This fixes NULL derefs in error paths. Spotted by Coverity.

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: fix resource leak in block.c error path</title>
<updated>2022-01-20T19:31:52Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-01-20T15:12:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=24d4d38c0b32fd4eb075af89d7b744c5647db5c2'/>
<id>urn:sha1:24d4d38c0b32fd4eb075af89d7b744c5647db5c2</id>
<content type='text'>
Add test coverage for corrupt zlib data. Fix memory leaks demonstrated by
unittest.

This problem was discovered by a Coverity scan.

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: read reftable files</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:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=46bc0e731a70716485bc3c8bdaf7e6e6f88073a9'/>
<id>urn:sha1:46bc0e731a70716485bc3c8bdaf7e6e6f88073a9</id>
<content type='text'>
This supports reading a single reftable file.

The commit introduces an abstract iterator type, which captures the usecases
both of reading individual refs, and iterating over a segment of the ref
namespace.

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>
