<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/reftable/stack.c, branch v2.46.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.46.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.46.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-06-17T22:55:58Z</updated>
<entry>
<title>Merge branch 'ps/no-writable-strings'</title>
<updated>2024-06-17T22:55:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-06-17T22:55:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4216329457926de0d977975fe9e3eef97a08be54'/>
<id>urn:sha1:4216329457926de0d977975fe9e3eef97a08be54</id>
<content type='text'>
Building with "-Werror -Wwrite-strings" is now supported.

* ps/no-writable-strings: (27 commits)
  config.mak.dev: enable `-Wwrite-strings` warning
  builtin/merge: always store allocated strings in `pull_twohead`
  builtin/rebase: always store allocated string in `options.strategy`
  builtin/rebase: do not assign default backend to non-constant field
  imap-send: fix leaking memory in `imap_server_conf`
  imap-send: drop global `imap_server_conf` variable
  mailmap: always store allocated strings in mailmap blob
  revision: always store allocated strings in output encoding
  remote-curl: avoid assigning string constant to non-const variable
  send-pack: always allocate receive status
  parse-options: cast long name for OPTION_ALIAS
  http: do not assign string constant to non-const field
  compat/win32: fix const-correctness with string constants
  pretty: add casts for decoration option pointers
  object-file: make `buf` parameter of `index_mem()` a constant
  object-file: mark cached object buffers as const
  ident: add casts for fallback name and GECOS
  entry: refactor how we remove items for delayed checkouts
  line-log: always allocate the output prefix
  line-log: stop assigning string constant to file parent buffer
  ...
</content>
</entry>
<entry>
<title>Merge branch 'ps/ref-storage-migration'</title>
<updated>2024-06-17T22:55:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-06-17T22:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=40a163f217da87b735f2f6b1916a81c4d21689c8'/>
<id>urn:sha1:40a163f217da87b735f2f6b1916a81c4d21689c8</id>
<content type='text'>
A new command has been added to migrate a repository that uses the
files backend for its ref storage to use the reftable backend, with
limitations.

* ps/ref-storage-migration:
  builtin/refs: new command to migrate ref storage formats
  refs: implement logic to migrate between ref storage formats
  refs: implement removal of ref storages
  worktree: don't store main worktree twice
  reftable: inline `merged_table_release()`
  refs/files: fix NULL pointer deref when releasing ref store
  refs/files: extract function to iterate through root refs
  refs/files: refactor `add_pseudoref_and_head_entries()`
  refs: allow to skip creation of reflog entries
  refs: pass storage format to `ref_store_init()` explicitly
  refs: convert ref storage format to an enum
  setup: unset ref storage when reinitializing repository version
</content>
</entry>
<entry>
<title>global: improve const correctness when assigning string constants</title>
<updated>2024-06-07T17:30:48Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-06-07T06:37:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b567004b4b43f9b0d88aa1f0b15698eae8f15836'/>
<id>urn:sha1:b567004b4b43f9b0d88aa1f0b15698eae8f15836</id>
<content type='text'>
We're about to enable `-Wwrite-strings`, which changes the type of
string constants to `const char[]`. Fix various sites where we assign
such constants to non-const variables.

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: inline `merged_table_release()`</title>
<updated>2024-06-06T16:04:32Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-06-06T05:29:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5d7db9e83e16cad6fb2a055029a8d1c72af04c9'/>
<id>urn:sha1:b5d7db9e83e16cad6fb2a055029a8d1c72af04c9</id>
<content type='text'>
The function `merged_table_release()` releases a merged table, whereas
`reftable_merged_table_free()` releases a merged table and then also
free's its pointer. But all callsites of `merged_table_release()` are in
fact followed by `reftable_merged_table_free()`, which is redundant.

Inline `merged_table_release()` into `reftable_merged_table_free()` to
get rid of this redundance.

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>Merge branch 'ps/reftable-reusable-iterator'</title>
<updated>2024-05-30T21:15:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-05-30T21:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=67ce50ba26507e99c53dcd4b1d85ad8565a31c23'/>
<id>urn:sha1:67ce50ba26507e99c53dcd4b1d85ad8565a31c23</id>
<content type='text'>
Code clean-up to make the reftable iterator closer to be reusable.

* ps/reftable-reusable-iterator:
  reftable/merged: adapt interface to allow reuse of iterators
  reftable/stack: provide convenience functions to create iterators
  reftable/reader: adapt interface to allow reuse of iterators
  reftable/generic: adapt interface to allow reuse of iterators
  reftable/generic: move seeking of records into the iterator
  reftable/merged: simplify indices for subiterators
  reftable/merged: split up initialization and seeking of records
  reftable/reader: set up the reader when initializing table iterator
  reftable/reader: inline `reader_seek_internal()`
  reftable/reader: separate concerns of table iter and reftable reader
  reftable/reader: unify indexed and linear seeking
  reftable/reader: avoid copying index iterator
  reftable/block: use `size_t` to track restart point index
</content>
</entry>
<entry>
<title>reftable/merged: adapt interface to allow reuse of iterators</title>
<updated>2024-05-14T00:04:19Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-05-13T08:48:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=369b84196e5b12496a18d4ea683b507bd0f1d953'/>
<id>urn:sha1:369b84196e5b12496a18d4ea683b507bd0f1d953</id>
<content type='text'>
Refactor the interfaces exposed by `struct reftable_merged_table` and
`struct merged_iter` such that they support iterator reuse. This is done
by separating initialization of the iterator and seeking on it.

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/stack: provide convenience functions to create iterators</title>
<updated>2024-05-14T00:04:19Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-05-13T08:47:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=08efe69212fc158fb17294fc3396fa9d048d2285'/>
<id>urn:sha1:08efe69212fc158fb17294fc3396fa9d048d2285</id>
<content type='text'>
There exist a bunch of call sites in the reftable backend that want to
create iterators for a reftable stack. This is rather convoluted right
now, where you always have to go via the merged table. And it is about
to become even more convoluted when we split up iterator initialization
and seeking in the next commit.

Introduce convenience functions that allow the caller to create an
iterator from a reftable stack directly without going through the merged
table. Adapt callers accordingly.

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: make the compaction factor configurable</title>
<updated>2024-05-14T00:02:39Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-05-13T08:18:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f663d34306d414bca27cf6b5dc7affb00e8603fe'/>
<id>urn:sha1:f663d34306d414bca27cf6b5dc7affb00e8603fe</id>
<content type='text'>
When auto-compacting, the reftable library packs references such that
the sizes of the tables form a geometric sequence. The factor for this
geometric sequence is hardcoded to 2 right now. We're about to expose
this as a config option though, so let's expose the factor via write
options.

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: pass opts as constant pointer</title>
<updated>2024-05-14T00:02:38Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-05-13T08:17:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=799237852bd265feb1e1a8d4a19780e20991b4fd'/>
<id>urn:sha1:799237852bd265feb1e1a8d4a19780e20991b4fd</id>
<content type='text'>
We sometimes pass the refatble write options as value and sometimes as a
pointer. This is quite confusing and makes the reader wonder whether the
options get modified sometimes.

In fact, `reftable_new_writer()` does cause the caller-provided options
to get updated when some values aren't set up. This is quite unexpected,
but didn't cause any harm until now.

Adapt the code so that we do not modify the caller-provided values
anymore. While at it, refactor the code to code to consistently pass the
options as a constant pointer to clarify that the caller-provided opts
will not ever get modified.

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: consistently refer to `reftable_write_options` as `opts`</title>
<updated>2024-05-14T00:02:37Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-05-13T08:17:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d35bb2abaeff3965024b0f1599641641bcb17a6'/>
<id>urn:sha1:4d35bb2abaeff3965024b0f1599641641bcb17a6</id>
<content type='text'>
Throughout the reftable library the `reftable_write_options` are
sometimes referred to as `cfg` and sometimes as `opts`. Unify these to
consistently use `opts` to avoid confusion.

While at it, touch up the coding style a bit by removing unneeded braces
around one-line statements and newlines between variable declarations.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
