<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs/debug.c, branch main</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2025-12-30T03:58:20Z</updated>
<entry>
<title>Merge branch 'gf/maintenance-is-needed-fix'</title>
<updated>2025-12-30T03:58:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-12-30T03:58:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=2365d4f612124098f14220debdb66cdb89524a70'/>
<id>urn:sha1:2365d4f612124098f14220debdb66cdb89524a70</id>
<content type='text'>
Brown-paper-bag fix to a recently graduated
'kn/maintenance-is-needed' topic.

* gf/maintenance-is-needed-fix:
  refs: dereference the value of the required pointer
</content>
</entry>
<entry>
<title>refs: dereference the value of the required pointer</title>
<updated>2025-12-19T03:55:38Z</updated>
<author>
<name>Greg Funni</name>
<email>gfunni234@gmail.com</email>
</author>
<published>2025-12-18T16:10:49Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=46d0ee2d6996779bf33acb83e36240443e27c79e'/>
<id>urn:sha1:46d0ee2d6996779bf33acb83e36240443e27c79e</id>
<content type='text'>
Currently, this always prints yes because required is non-null.

This is the wrong behavior. The boolean must be
dereferenced.

Signed-off-by: Greg Funni &lt;gfunni234@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kn/maintenance-is-needed'</title>
<updated>2025-11-21T17:14:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-21T17:14:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c62d2d381087b6ab0f485dc9d27346ff887600cc'/>
<id>urn:sha1:c62d2d381087b6ab0f485dc9d27346ff887600cc</id>
<content type='text'>
"git maintenance" command learned "is-needed" subcommand to tell if
it is necessary to perform various maintenance tasks.

* kn/maintenance-is-needed:
  maintenance: add 'is-needed' subcommand
  maintenance: add checking logic in `pack_refs_condition()`
  refs: add a `optimize_required` field to `struct ref_storage_be`
  reftable/stack: add function to check if optimization is required
  reftable/stack: return stack segments directly
</content>
</entry>
<entry>
<title>Merge branch 'kn/refs-optim-cleanup'</title>
<updated>2025-11-19T18:55:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-19T18:55:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=7ccfc262d7850f2eddd860b31b9f69a152687702'/>
<id>urn:sha1:7ccfc262d7850f2eddd860b31b9f69a152687702</id>
<content type='text'>
Code clean-up.

* kn/refs-optim-cleanup:
  t/pack-refs-tests: move the 'test_done' to callees
  refs: rename 'pack_refs_opts' to 'refs_optimize_opts'
  refs: move to using the '.optimize' functions
</content>
</entry>
<entry>
<title>Merge branch 'ps/ref-peeled-tags'</title>
<updated>2025-11-19T18:55:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-19T18:55:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=13134cecb08604fc2a4d30b6f9f941f6323e6de2'/>
<id>urn:sha1:13134cecb08604fc2a4d30b6f9f941f6323e6de2</id>
<content type='text'>
Some ref backend storage can hold not just the object name of an
annotated tag, but the object name of the object the tag points at.
The code to handle this information has been streamlined.

* ps/ref-peeled-tags:
  t7004: do not chdir around in the main process
  ref-filter: fix stale parsed objects
  ref-filter: parse objects on demand
  ref-filter: detect broken tags when dereferencing them
  refs: don't store peeled object IDs for invalid tags
  object: add flag to `peel_object()` to verify object type
  refs: drop infrastructure to peel via iterators
  refs: drop `current_ref_iter` hack
  builtin/show-ref: convert to use `reference_get_peeled_oid()`
  ref-filter: propagate peeled object ID
  upload-pack: convert to use `reference_get_peeled_oid()`
  refs: expose peeled object ID via the iterator
  refs: refactor reference status flags
  refs: fully reset `struct ref_iterator::ref` on iteration
  refs: introduce `.ref` field for the base iterator
  refs: introduce wrapper struct for `each_ref_fn`
</content>
</entry>
<entry>
<title>refs: add a `optimize_required` field to `struct ref_storage_be`</title>
<updated>2025-11-10T17:28:48Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2025-11-08T21:51:55Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f6c5ca387a7693b16158826d157178be0ba439dc'/>
<id>urn:sha1:f6c5ca387a7693b16158826d157178be0ba439dc</id>
<content type='text'>
To allow users of the refs namespace to check if the reference backend
requires optimization, add a new field `optimize_required` field to
`struct ref_storage_be`. This field is of type `optimize_required_fn`
which is also introduced in this commit.

Modify the debug, files, packed and reftable backend to implement this
field. A following commit will expose this via 'git pack-refs' and 'git
refs optimize'.

Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Acked-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: rename 'pack_refs_opts' to 'refs_optimize_opts'</title>
<updated>2025-11-04T15:35:12Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2025-10-20T08:18:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=2cd99d984122f7f1cd7c3b153ee0a0d566831b30'/>
<id>urn:sha1:2cd99d984122f7f1cd7c3b153ee0a0d566831b30</id>
<content type='text'>
The previous commit removed all references to 'pack_refs()' within
the refs subsystem. Continue this cleanup by also renaming
'pack_refs_opts' to 'refs_optimize_opts' and the respective flags
accordingly. Keeping the naming consistent will make the code easier to
maintain.

Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: move to using the '.optimize' functions</title>
<updated>2025-11-04T15:35:12Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2025-10-20T08:18:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9b93ab8a9c61c53b3b9b2b3ba60c3e5d66b8ff56'/>
<id>urn:sha1:9b93ab8a9c61c53b3b9b2b3ba60c3e5d66b8ff56</id>
<content type='text'>
The `struct ref_store` variable exposes two ways to optimize a reftable
backend:

  1. pack_refs
  2. optimize

The former was specific to the 'files' + 'packed' refs backend. The
latter is more generic and covers all backends. While the naming is
different, both of these functions perform the same functionality.

Consolidate this code to only maintain the 'optimize' functions. Do this
by modifying the backends so that they exclusively implement the
`optimize` callback, only. All users of the refs subsystem already use
the 'optimize' function so there is no changes needed on the callee
side. Finally, cleanup all references to the 'pack_refs' field of the
structure and code around it.

Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: drop infrastructure to peel via iterators</title>
<updated>2025-11-04T15:32:25Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-10-23T07:16:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=705114772e0a0741c3288329bd9ac4e11e38db9a'/>
<id>urn:sha1:705114772e0a0741c3288329bd9ac4e11e38db9a</id>
<content type='text'>
Now that the peeled object ID gets propagated via the `struct reference`
there is no need anymore to call into the reference iterator itself to
dereference an object. Remove this infrastructure.

Most of the changes are straight-forward deletions of code. There is one
exception though in `refs/packed-backend.c::write_with_updates()`. Here
we stop peeling the iterator and instead just pass the peeled object ID
of that iterator directly.

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>refs: introduce `.ref` field for the base iterator</title>
<updated>2025-11-04T15:32:25Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-10-23T07:16:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=89baa52da612dde6da031acfa2cb957d4297d544'/>
<id>urn:sha1:89baa52da612dde6da031acfa2cb957d4297d544</id>
<content type='text'>
The base iterator has a couple of fields that tracks the name, target,
object ID and flags for the current reference. Due to this design we
have to create a new `struct reference` whenever we want to hand over
that reference to the callback function, which is tedious and not very
efficient.

Convert the structure to instead contain a `struct reference` as member.
This member is expected to be populated by the implementations of the
iterator and is handed over to the callback directly.

While at it, simplify `should_pack_ref()` to take a `struct reference`
directly instead of passing its respective fields.

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