<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/fetch-pack.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>2026-04-08T17:19:17Z</updated>
<entry>
<title>Merge branch 'ps/odb-cleanup'</title>
<updated>2026-04-08T17:19:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-08T17:19:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9797fed6cea706f65de64396222545d545226e15'/>
<id>urn:sha1:9797fed6cea706f65de64396222545d545226e15</id>
<content type='text'>
Various code clean-up around odb subsystem.

* ps/odb-cleanup:
  odb: drop unneeded headers and forward decls
  odb: rename `odb_has_object()` flags
  odb: use enum for `odb_write_object` flags
  odb: rename `odb_write_object()` flags
  treewide: use enum for `odb_for_each_object()` flags
  CodingGuidelines: document our style for flags
</content>
</entry>
<entry>
<title>Merge branch 'ps/fsck-wo-the-repository'</title>
<updated>2026-04-07T21:59:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-07T21:59:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=7b6d0cd51b30e842ffb95d045385100b7c677886'/>
<id>urn:sha1:7b6d0cd51b30e842ffb95d045385100b7c677886</id>
<content type='text'>
Internals of "git fsck" have been refactored to not depend on the
global `the_repository` variable.

* ps/fsck-wo-the-repository:
  builtin/fsck: stop using `the_repository` in error reporting
  builtin/fsck: stop using `the_repository` when marking objects
  builtin/fsck: stop using `the_repository` when checking packed objects
  builtin/fsck: stop using `the_repository` with loose objects
  builtin/fsck: stop using `the_repository` when checking reflogs
  builtin/fsck: stop using `the_repository` when checking refs
  builtin/fsck: stop using `the_repository` when snapshotting refs
  builtin/fsck: fix trivial dependence on `the_repository`
  fsck: drop USE_THE_REPOSITORY
  fsck: store repository in fsck options
  fsck: initialize fsck options via a function
  fetch-pack: move fsck options into function scope
</content>
</entry>
<entry>
<title>odb: rename `odb_has_object()` flags</title>
<updated>2026-04-01T03:43:14Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-03-31T23:57:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c63911b052dc286de5daddba8d4a20fd59348cee'/>
<id>urn:sha1:c63911b052dc286de5daddba8d4a20fd59348cee</id>
<content type='text'>
Rename `odb_has_object()` flags to be properly prefixed with the
function name.

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>use strvec_pushv() to add another strvec</title>
<updated>2026-03-24T19:26:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-24T19:26:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=250e977a2b0aa8cc1c8063c64c44597a166e79f5'/>
<id>urn:sha1:250e977a2b0aa8cc1c8063c64c44597a166e79f5</id>
<content type='text'>
Add and apply a semantic patch that simplifies the code by letting
strvec_pushv() append the items of a second strvec instead of pushing
them one by one.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fsck: store repository in fsck options</title>
<updated>2026-03-23T15:33:10Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-03-23T15:02:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=374985390871cb67c02b1608b693480e89567b9a'/>
<id>urn:sha1:374985390871cb67c02b1608b693480e89567b9a</id>
<content type='text'>
The fsck subsystem relies on `the_repository` quite a bit. While we
could of course explicitly pass a repository down the callchain, we
already have a `struct fsck_options` that we pass to almost all
functions.

Extend the options to also store the repository to make it readily
available.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
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>fsck: initialize fsck options via a function</title>
<updated>2026-03-23T15:33:10Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-03-23T15:02:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f22360902621e0807a1c0a77476e3e4d323c708d'/>
<id>urn:sha1:f22360902621e0807a1c0a77476e3e4d323c708d</id>
<content type='text'>
We initialize the `struct fsck_options` via a set of macros, often in
global scope. In the next commit though we're about to introduce a new
repository field to the options that must be initialized, and naturally
we don't have a repo other than `the_repository` available in this
scope.

Refactor the code to instead intrdouce a new `fsck_options_init()`
function that initializes the options for us and move initialization
into function scope.

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>fetch-pack: move fsck options into function scope</title>
<updated>2026-03-23T15:33:09Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-03-23T15:02:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=17cabd369b5cb96bee9577f49247ef95d07058a7'/>
<id>urn:sha1:17cabd369b5cb96bee9577f49247ef95d07058a7</id>
<content type='text'>
When fetching a packfile, we optionally verify received objects via the
fsck subsystem. The options for those consistency checks are declared in
global scope without a good reason, and they are never cleaned up. So in
case the options are reused, they may accumulate more state over time.

Furthermore, in subsequent changes we'll introduce a repository pointer
into the structure. Obviously though, we don't have a repository
available at static time, except for `the_repository`, which we don't
want to use here.

Refactor the code to move the options into the respective functions and
properly manage their lifecycle.

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/refs-for-each'</title>
<updated>2026-03-09T21:36:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-09T21:36:55Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=d445aecfb013ae7b45e946f9aea06464aee69ed8'/>
<id>urn:sha1:d445aecfb013ae7b45e946f9aea06464aee69ed8</id>
<content type='text'>
Code refactoring around refs-for-each-* API functions.

* ps/refs-for-each:
  refs: replace `refs_for_each_fullref_in()`
  refs: replace `refs_for_each_namespaced_ref()`
  refs: replace `refs_for_each_glob_ref()`
  refs: replace `refs_for_each_glob_ref_in()`
  refs: replace `refs_for_each_rawref_in()`
  refs: replace `refs_for_each_rawref()`
  refs: replace `refs_for_each_ref_in()`
  refs: improve verification for-each-ref options
  refs: generalize `refs_for_each_fullref_in_prefixes()`
  refs: generalize `refs_for_each_namespaced_ref()`
  refs: speed up `refs_for_each_glob_ref_in()`
  refs: introduce `refs_for_each_ref_ext`
  refs: rename `each_ref_fn`
  refs: rename `do_for_each_ref_flags`
  refs: move `do_for_each_ref_flags` further up
  refs: move `refs_head_ref_namespaced()`
  refs: remove unused `refs_for_each_include_root_ref()`
</content>
</entry>
<entry>
<title>refs: replace `refs_for_each_rawref()`</title>
<updated>2026-02-23T21:21:18Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-02-23T11:59:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=67034081adc956c4dc8b51f59a9b70b8861c4642'/>
<id>urn:sha1:67034081adc956c4dc8b51f59a9b70b8861c4642</id>
<content type='text'>
Replace calls to `refs_for_each_rawref()` with the newly introduced
`refs_for_each_ref_ext()` function.

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>fetch-pack: wire up and enable auto filter logic</title>
<updated>2026-02-17T19:46:41Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2026-02-16T13:23:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ef2f1845ec4b683df791bfd956f551b096a38009'/>
<id>urn:sha1:ef2f1845ec4b683df791bfd956f551b096a38009</id>
<content type='text'>
Previous commits have set up an infrastructure for `--filter=auto` to
automatically prepare a partial clone filter based on what the server
advertised and the client accepted.

Using that infrastructure, let's now enable the `--filter=auto` option
in `git clone` and `git fetch` by setting `allow_auto_filter` to 1.

Note that these small changes mean that when `git clone --filter=auto`
or `git fetch --filter=auto` are used, "auto" is automatically saved
as the partial clone filter for the server on the client. Therefore
subsequent calls to `git fetch` on the client will automatically use
this "auto" mode even without `--filter=auto`.

Let's also set `allow_auto_filter` to 1 in `transport.c`, as the
transport layer must be able to accept the "auto" filter spec even if
the invoking command hasn't fully parsed it yet.

When an "auto" filter is requested, let's have the "fetch-pack.c" code
in `do_fetch_pack_v2()` compute a filter and send it to the server.

In `do_fetch_pack_v2()` the logic also needs to check for the
"promisor-remote" capability and call `promisor_remote_reply()` to
parse advertised remotes and populate the list of those accepted (and
their filters).

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
