<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/fetch.c, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-04-17T04:27:22Z</updated>
<entry>
<title>Merge branch 'ds/fetch-negotiation-options' into jch</title>
<updated>2026-04-17T04:27:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-17T04:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=878809dc2ef29cc38c434c135f3e26cf0eb2509f'/>
<id>urn:sha1:878809dc2ef29cc38c434c135f3e26cf0eb2509f</id>
<content type='text'>
The negotiation tip options in "git fetch" have been reworked to
allow requiring certain refs to be sent as "have" lines, and to
restrict negotiation to a specific set of refs.

* ds/fetch-negotiation-options:
  send-pack: pass negotiation config in push
  remote: add negotiationRequire config as default for --negotiation-require
  fetch: add --negotiation-require option for negotiation
  remote: add remote.*.negotiationRestrict config
  transport: rename negotiation_tips
  fetch: add --negotiation-restrict option
  t5516: fix test order flakiness
</content>
</entry>
<entry>
<title>Merge branch 'ua/push-remote-group' (early part) into jch</title>
<updated>2026-04-17T04:27:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-17T04:27:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=23f10a7d30e0e4837c117a6e151e9508c837e7cf'/>
<id>urn:sha1:23f10a7d30e0e4837c117a6e151e9508c837e7cf</id>
<content type='text'>
* 'ua/push-remote-group' (early part):
  push: support pushing to a remote group
  remote: move remote group resolution to remote.c
</content>
</entry>
<entry>
<title>remote: add negotiationRequire config as default for --negotiation-require</title>
<updated>2026-04-15T18:30:40Z</updated>
<author>
<name>Derrick Stolee</name>
<email>stolee@gmail.com</email>
</author>
<published>2026-04-15T15:14:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=288ea6c3c275d29817efa6e80711701abd041dfe'/>
<id>urn:sha1:288ea6c3c275d29817efa6e80711701abd041dfe</id>
<content type='text'>
Add a new 'remote.&lt;name&gt;.negotiationRequire' multi-valued config option
that provides default values for --negotiation-require when no
--negotiation-require arguments are specified over the command line.
This is a mirror of how 'remote.&lt;name&gt;.negotiationRestrict' specifies
defaults for the --negotiation-restrict arguments.

Each value is either an exact ref name or a glob pattern whose tips
should always be sent as 'have' lines during negotiation. The config
values are resolved through the same resolve_negotiation_require()
codepath as the CLI options.

This option is additive with the normal negotiation process: the
negotiation algorithm still runs and advertises its own selected
commits, but the refs matching the config are sent unconditionally
on top of those heuristically selected commits.

Signed-off-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch: add --negotiation-require option for negotiation</title>
<updated>2026-04-15T18:30:40Z</updated>
<author>
<name>Derrick Stolee</name>
<email>stolee@gmail.com</email>
</author>
<published>2026-04-15T15:14:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=18d5475b45b2a883ca88b12c87f4cc19d1ec5cf2'/>
<id>urn:sha1:18d5475b45b2a883ca88b12c87f4cc19d1ec5cf2</id>
<content type='text'>
Add a new --negotiation-require option to 'git fetch', which ensures
that certain ref tips are always sent as 'have' lines during fetch
negotiation, regardless of what the negotiation algorithm selects.

This is useful when the repository has a large number of references, so
the normal negotiation algorithm truncates the list. This is especially
important in repositories with long parallel commit histories. For
example, a repo could have a 'dev' branch for development and a
'release' branch for released versions. If the 'dev' branch isn't
selected for negotiation, then it's not a big deal because there are
many in-progress development branches with a shared history. However, if
'release' is not selected for negotiation, then the server may think
that this is the first time the client has asked for that reference,
causing a full download of its parallel commit history (and any extra
data that may be unique to that branch). This is based on a real example
where certain fetches would grow to 60+ GB when a release branch
updated.

This option is a complement to --negotiation-restrict, which reduces the
negotiation ref set to a specific list. In the earlier example, using
--negotiation-restrict to focus the negotiation to 'dev' and 'release'
would avoid those problematic downloads, but would still not allow
advertising potentially-relevant user brances. In this way, the
'require' version solves the problem I mention while allowing
negotiation to pick other references opportunistically. The two options
can also be combined to allow the best of both worlds.

The argument may be an exact ref name or a glob pattern. Non-existent
refs are silently ignored.

Also add --negotiation-require to 'git pull' passthrough options.

Signed-off-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote: add remote.*.negotiationRestrict config</title>
<updated>2026-04-15T18:30:40Z</updated>
<author>
<name>Derrick Stolee</name>
<email>stolee@gmail.com</email>
</author>
<published>2026-04-15T15:14:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=203275d13a761d8d4dfecddc0a78beb5daebf51c'/>
<id>urn:sha1:203275d13a761d8d4dfecddc0a78beb5daebf51c</id>
<content type='text'>
In a previous change, the --negotiation-restrict command-line option of
'git fetch' was added as a synonym of --negotiation-tips. Both of these
options restrict the set of 'haves' the client can send as part of
negotiation.

This was previously not available via a configuration option. Add a new
'remote.&lt;name&gt;.negotiationRestrict' multi-valued config option that
updates 'git fetch &lt;name&gt;' to use these restrictions by default.

If the user provides even one --negotiation-restrict argument, then the
config is ignored.

Signed-off-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>transport: rename negotiation_tips</title>
<updated>2026-04-15T18:30:39Z</updated>
<author>
<name>Derrick Stolee</name>
<email>stolee@gmail.com</email>
</author>
<published>2026-04-15T15:14:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9596a1ca95a847afe26d9c25cb8a17f6b697a9a2'/>
<id>urn:sha1:9596a1ca95a847afe26d9c25cb8a17f6b697a9a2</id>
<content type='text'>
The previous change added the --negotiation-restrict synonym for the
--negotiation-tips option for 'git fetch'. In anticipation of adding a
new option that behaves similarly but with distinct changes to its
behavior, rename the internal representation of this data from
'negotiation_tips' to 'negotiation_restrict_tips'.

The 'tips' part is kept because this is an oid_array in the transport
layer. This requires the builtin to handle parsing refs into collections
of oids so the transport layer can handle this cleaner form of the data.

Signed-off-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch: add --negotiation-restrict option</title>
<updated>2026-04-15T18:30:39Z</updated>
<author>
<name>Derrick Stolee</name>
<email>stolee@gmail.com</email>
</author>
<published>2026-04-15T15:14:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d542ba848889be052927828218a0d4c88a812cb4'/>
<id>urn:sha1:d542ba848889be052927828218a0d4c88a812cb4</id>
<content type='text'>
The --negotiation-tip option to 'git fetch' and 'git pull' allows users
to specify that they want to focus negotiation on a small set of
references. This is a _restriction_ on the negotiation set, helping to
focus the negotiation when the ref count is high. However, it doesn't
allow for the ability to opportunistically select references beyond that
list.

This subtle detail that this is a 'maximum set' and not a 'minimum set'
is not immediately clear from the option name. This makes it more
complicated to add a new option that provides the complementary behavior
of a minimum set.

For now, create a new synonym option, --negotiation-restrict, that
behaves identically to --negotiation-tip. Update the documentation to
make it clear that this new name is the preferred option, but we keep
the old name for compatibility.

Update a few warning messages with the new option, but also make them
translatable with the option name inserted by formatting. At least one
of these messages will be reused later for a new option.

Signed-off-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</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='https://git.shady.money/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>remote: move remote group resolution to remote.c</title>
<updated>2026-03-25T19:35:15Z</updated>
<author>
<name>Usman Akinyemi</name>
<email>usmanakinyemi202@gmail.com</email>
</author>
<published>2026-03-25T19:09:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee832e326985499ca3f17855f69dca22a4d41406'/>
<id>urn:sha1:ee832e326985499ca3f17855f69dca22a4d41406</id>
<content type='text'>
`get_remote_group`, `add_remote_or_group`, and the `remote_group_data`
struct are currently defined as static helpers inside builtin/fetch.c.
They implement generic remote group resolution that is not specific to
fetch — they parse `remotes.&lt;name&gt;` config entries and resolve a name
to either a list of group members or a single configured remote.

Move them to remote.c and declare them in remote.h so that other
builtins can use the same logic without duplication.

Useful for the next patch.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Usman Akinyemi &lt;usmanakinyemi202@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: wean auto_maintenance() functions off the_repository</title>
<updated>2026-03-12T15:30:57Z</updated>
<author>
<name>Burak Kaan Karaçay</name>
<email>bkkaracay@gmail.com</email>
</author>
<published>2026-03-12T14:44:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9df3be8e2e7e2c9bf200de4bcfbd4e690a57f033'/>
<id>urn:sha1:9df3be8e2e7e2c9bf200de4bcfbd4e690a57f033</id>
<content type='text'>
The prepare_auto_maintenance() relies on the_repository to read
configurations. Since run_auto_maintenance() calls
prepare_auto_maintenance(), it also implicitly depends the_repository.

Add 'struct repository *' as a parameter to both functions and update
all callers to pass the_repository.

With no global repository dependencies left in this file, remove the
USE_THE_REPOSITORY_VARIABLE macro.

Suggested-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Burak Kaan Karaçay &lt;bkkaracay@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
