<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/fetch-pack.c, branch v2.37.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.37.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.37.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-06-03T21:30:34Z</updated>
<entry>
<title>Merge branch 'ds/bundle-uri'</title>
<updated>2022-06-03T21:30:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-06-03T21:30:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3b2ddced295c26134568cf879488a921a352865'/>
<id>urn:sha1:b3b2ddced295c26134568cf879488a921a352865</id>
<content type='text'>
Preliminary code refactoring around transport and bundle code.

* ds/bundle-uri:
  bundle.h: make "fd" version of read_bundle_header() public
  remote: allow relative_url() to return an absolute url
  remote: move relative_url()
  http: make http_get_file() external
  fetch-pack: move --keep=* option filling to a function
  fetch-pack: add a deref_without_lazy_fetch_extended()
  dir API: add a generalized path_match_flags() function
  connect.c: refactor sending of agent &amp; object-format
</content>
</entry>
<entry>
<title>Merge branch 'jt/fetch-peek-optional-section'</title>
<updated>2022-05-25T23:42:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-05-25T23:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9cf4e0c8d259ec822b0e017a1739e75494f5623d'/>
<id>urn:sha1:9cf4e0c8d259ec822b0e017a1739e75494f5623d</id>
<content type='text'>
"git fetch" unnecessarily failed when an unexpected optional
section appeared in the output, which has been corrected.

* jt/fetch-peek-optional-section:
  fetch-pack: make unexpected peek result non-fatal
</content>
</entry>
<entry>
<title>fetch-pack: move --keep=* option filling to a function</title>
<updated>2022-05-16T22:02:09Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-05-16T20:11:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f6cf4508ed554b473bb1e5cf89df18f617fe2a2'/>
<id>urn:sha1:1f6cf4508ed554b473bb1e5cf89df18f617fe2a2</id>
<content type='text'>
Move the populating of the --keep=* option argument to "index-pack" to
a static function, a subsequent commit will make use of it in another
function.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch-pack: add a deref_without_lazy_fetch_extended()</title>
<updated>2022-05-16T22:02:09Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-05-16T20:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a6e65fb39caf18259c660c1c7910d5bf80bc15cb'/>
<id>urn:sha1:a6e65fb39caf18259c660c1c7910d5bf80bc15cb</id>
<content type='text'>
Add a version of the deref_without_lazy_fetch function which can be
called with custom oi_flags and to grab information about the
"object_type". This will be used for the bundle-uri client in a
subsequent commit.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch-pack: make unexpected peek result non-fatal</title>
<updated>2022-05-16T16:11:12Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2022-05-16T11:02:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7709acf7beca41be2e382eb0e6c13b5003a20c1a'/>
<id>urn:sha1:7709acf7beca41be2e382eb0e6c13b5003a20c1a</id>
<content type='text'>
When a Git server responds to a fetch request, it may send optional
sections before the packfile section. To handle this, the Git client
calls packet_reader_peek() (see process_section_header()) in order to
see what's next without consuming the line.

However, as implemented, Git errors out whenever what's peeked is not an
ordinary line. This is not only unexpected (here, we only need to know
whether the upcoming line is the section header we want) but causes
errors to include the name of a section header that is irrelevant to the
cause of the error. For example, at $DAYJOB, we have seen "fatal: error
reading section header 'shallow-info'" error messages when none of the
repositories involved are shallow.

Therefore, fix this so that the peek returns 1 if the upcoming line is
the wanted section header and nothing else. Because of this change,
reader-&gt;line may now be NULL later in the function, so update the error
message printing code accordingly.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch-pack: add refetch</title>
<updated>2022-03-28T17:25:52Z</updated>
<author>
<name>Robert Coup</name>
<email>robert@coup.net.nz</email>
</author>
<published>2022-03-28T14:02:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4dfd0925cbba78cc737e3af29faa5774bbc7b6a3'/>
<id>urn:sha1:4dfd0925cbba78cc737e3af29faa5774bbc7b6a3</id>
<content type='text'>
Allow a "refetch" where the contents of the local object store are
ignored and a full fetch is performed, not attempting to find or
negotiate common commits with the remote.

A key use case is to apply a new partial clone blob/tree filter and
refetch all the associated matching content, which would otherwise not
be transferred when the commit objects are already present locally.

Signed-off-by: Robert Coup &lt;robert@coup.net.nz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/fetch-optim-with-commit-graph'</title>
<updated>2022-02-24T00:58:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-02-24T00:58:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=68fd3b35f7ad703fd94218b9faf42baa34819f93'/>
<id>urn:sha1:68fd3b35f7ad703fd94218b9faf42baa34819f93</id>
<content type='text'>
A couple of optimization to "git fetch".

* ps/fetch-optim-with-commit-graph:
  fetch: skip computing output width when not printing anything
  fetch-pack: use commit-graph when computing cutoff
</content>
</entry>
<entry>
<title>Merge branch 'bs/forbid-i18n-of-protocol-token-in-fetch-pack'</title>
<updated>2022-02-24T00:58:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-02-24T00:58:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c69e455bbced1ae89ff386af889b65ad0b3b0927'/>
<id>urn:sha1:c69e455bbced1ae89ff386af889b65ad0b3b0927</id>
<content type='text'>
L10n support for a few error messages.

* bs/forbid-i18n-of-protocol-token-in-fetch-pack:
  fetch-pack: parameterize message containing 'ready' keyword
</content>
</entry>
<entry>
<title>fetch-pack: parameterize message containing 'ready' keyword</title>
<updated>2022-02-11T22:37:09Z</updated>
<author>
<name>Bagas Sanjaya</name>
<email>bagasdotme@gmail.com</email>
</author>
<published>2021-12-22T07:58:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3d3c23b3a754cf5060a93d9f777e58662cdd5ffe'/>
<id>urn:sha1:3d3c23b3a754cf5060a93d9f777e58662cdd5ffe</id>
<content type='text'>
The protocol keyword 'ready' isn't meant for translation. Pass it as
parameter instead of spell it in die() message (and potentially confuse
translators).

Signed-off-by: Bagas Sanjaya &lt;bagasdotme@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch-pack: use commit-graph when computing cutoff</title>
<updated>2022-02-10T17:59:38Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2022-02-10T12:28:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6fd1cc8f985ccd8b014e945a819482b267dae21f'/>
<id>urn:sha1:6fd1cc8f985ccd8b014e945a819482b267dae21f</id>
<content type='text'>
During packfile negotiation we iterate over all refs announced by the
remote side to check whether their IDs refer to commits already known to
us. If a commit is known to us already, then its date is a potential
cutoff point for commits we have in common with the remote side.

There is potentially a lot of commits announced by the remote depending
on how many refs there are in the remote repository, and for every one
of them we need to search for it in our object database and, if found,
parse the corresponding object to find out whether it is a candidate for
the cutoff date. This can be sped up by trying to look up commits via
the commit-graph first, which is a lot more efficient.

Benchmarks in a repository with about 2,1 million refs and an up-to-date
commit-graph show an almost 20% speedup when mirror-fetching:

    Benchmark 1: git fetch +refs/*:refs/* (v2.35.0)
      Time (mean ± σ):     115.587 s ±  2.009 s    [User: 109.874 s, System: 11.305 s]
      Range (min … max):   113.584 s … 118.820 s    5 runs

    Benchmark 2: git fetch +refs/*:refs/* (HEAD)
      Time (mean ± σ):     96.859 s ±  0.624 s    [User: 91.948 s, System: 10.980 s]
      Range (min … max):   96.180 s … 97.875 s    5 runs

    Summary
      'git fetch +refs/*:refs/* (HEAD)' ran
        1.19 ± 0.02 times faster than 'git fetch +refs/*:refs/* (v2.35.0)'

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