<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/connected.c, branch v2.23.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.23.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.23.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-07-01T17:11:09Z</updated>
<entry>
<title>check_everything_connected: assume alternate ref tips are valid</title>
<updated>2019-07-01T17:11:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-07-01T13:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39b44ba771a315602fd1fdca2e12dfc31ef9c613'/>
<id>urn:sha1:39b44ba771a315602fd1fdca2e12dfc31ef9c613</id>
<content type='text'>
When we receive a remote ref update to sha1 "X", we want to check that
we have all of the objects needed by "X". We can assume that our
repository is not currently corrupted, and therefore if we have a ref
pointing at "Y", we have all of its objects. So we can stop our
traversal from "X" as soon as we hit "Y".

If we make the same non-corruption assumption about any repositories we
use to store alternates, then we can also use their ref tips to shorten
the traversal.

This is especially useful when cloning with "--reference", as we
otherwise do not have any local refs to check against, and have to
traverse the whole history, even though the other side may have sent us
few or no objects. Here are results for the included perf test (which
shows off more or less the maximal savings, getting one new commit and
sharing the whole history):

Test                        HEAD^             HEAD
--------------------------------------------------------------------
[on git.git]
5600.3: clone --reference   2.94(2.86+0.08)   0.09(0.08+0.01) -96.9%
[on linux.git]
5600.3: clone --reference   45.74(45.34+0.41)   0.36(0.30+0.08) -99.2%

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: do faster object check for partial clones</title>
<updated>2019-04-21T05:08:53Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2019-04-19T21:00:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dfa33a298de2ab724d4812633bb009a90d1df790'/>
<id>urn:sha1:dfa33a298de2ab724d4812633bb009a90d1df790</id>
<content type='text'>
For partial clones, doing a full connectivity check is wasteful; we skip
promisor objects (which, for a partial clone, is all known objects), and
enumerating them all to exclude them from the connectivity check can
take a significant amount of time on large repos.

At most, we want to make sure that we get the objects referred to by any
wanted refs. For partial clones, just check that these objects were
transferred.

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch-pack: write shallow, then check connectivity</title>
<updated>2018-07-03T21:57:44Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2018-07-02T22:08:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cf1e7c07705eb21c30d0ee414810e7bc8fdf7d82'/>
<id>urn:sha1:cf1e7c07705eb21c30d0ee414810e7bc8fdf7d82</id>
<content type='text'>
When fetching, connectivity is checked after the shallow file is
updated. There are 2 issues with this: (1) the connectivity check is
only performed up to ancestors of existing refs (which is not thorough
enough if we were deepening an existing ref in the first place), and (2)
there is no rollback of the shallow file if the connectivity check
fails.

To solve (1), update the connectivity check to check the ancestry chain
completely in the case of a deepening fetch by refraining from passing
"--not --all" when invoking rev-list in connected.c.

To solve (2), have fetch_pack() perform its own connectivity check
before updating the shallow file. To support existing use cases in which
"git fetch-pack" is used to download objects without much regard as to
the connectivity of the resulting objects with respect to the existing
repository, the connectivity check is only done if necessary (that is,
the fetch is not a clone, and the fetch involves shallow/deepen
functionality). "git fetch" still performs its own connectivity check,
preserving correctness but sometimes performing redundant work. This
redundancy is mitigated by the fact that fetch_pack() reports if it has
performed a connectivity check itself, and if the transport supports
connect or stateless-connect, it will bubble up that report so that "git
fetch" knows not to perform the connectivity check in such a case.

This was noticed when a user tried to deepen an existing repository by
fetching with --no-shallow from a server that did not send all necessary
objects - the connectivity check as run by "git fetch" succeeded, but a
subsequent "git fsck" failed.

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>Merge branch 'jh/partial-clone'</title>
<updated>2018-02-13T21:39:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-02-13T21:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6bed209a20a06f2d6b7142216dabff456de798e1'/>
<id>urn:sha1:6bed209a20a06f2d6b7142216dabff456de798e1</id>
<content type='text'>
The machinery to clone &amp; fetch, which in turn involves packing and
unpacking objects, have been told how to omit certain objects using
the filtering mechanism introduced by the jh/object-filtering
topic, and also mark the resulting pack as a promisor pack to
tolerate missing objects, taking advantage of the mechanism
introduced by the jh/fsck-promisors topic.

* jh/partial-clone:
  t5616: test bulk prefetch after partial fetch
  fetch: inherit filter-spec from partial clone
  t5616: end-to-end tests for partial clone
  fetch-pack: restore save_commit_buffer after use
  unpack-trees: batch fetching of missing blobs
  clone: partial clone
  partial-clone: define partial clone settings in config
  fetch: support filters
  fetch: refactor calculation of remote list
  fetch-pack: test support excluding large blobs
  fetch-pack: add --no-filter
  fetch-pack, index-pack, transport: partial clone
  upload-pack: add object filtering for partial clone
</content>
</entry>
<entry>
<title>fetch: support filters</title>
<updated>2017-12-08T17:58:51Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2017-12-08T15:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=acb0c57260aa78fc99939de2a27c48b5a3fb4f21'/>
<id>urn:sha1:acb0c57260aa78fc99939de2a27c48b5a3fb4f21</id>
<content type='text'>
Teach fetch to support filters. This is only allowed for the remote
configured in extensions.partialcloneremote.

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>Convert check_connected to use struct object_id</title>
<updated>2017-10-16T02:05:50Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-10-15T22:06:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6ccac9eed56280f035d84605b4451ae1721a3100'/>
<id>urn:sha1:6ccac9eed56280f035d84605b4451ae1721a3100</id>
<content type='text'>
Convert check_connected and the callbacks it takes to use struct
object_id.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack: move {,re}prepare_packed_git and approximate_object_count</title>
<updated>2017-08-23T22:12:07Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2017-08-18T22:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0abe14f6a5b7681b4ea02d1bd0a64332587ae053'/>
<id>urn:sha1:0abe14f6a5b7681b4ea02d1bd0a64332587ae053</id>
<content type='text'>
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>pack: move add_packed_git()</title>
<updated>2017-08-23T22:12:07Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2017-08-18T22:20:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a4286537489f77b6e68f0ad0fc4398c4ec9846b'/>
<id>urn:sha1:9a4286537489f77b6e68f0ad0fc4398c4ec9846b</id>
<content type='text'>
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>check_connected: accept an env argument</title>
<updated>2016-10-10T20:54:02Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-10-03T20:49:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=526f108a271b331af9ae92796215e560e5ec4677'/>
<id>urn:sha1:526f108a271b331af9ae92796215e560e5ec4677</id>
<content type='text'>
This lets callers influence the environment seen by
rev-list, which will be useful when we start providing
quarantined objects.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>check_connected: add progress flag</title>
<updated>2016-07-20T19:11:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-07-15T10:32:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=70d5e2d77b4c2afdb442b37924bc252793e106d9'/>
<id>urn:sha1:70d5e2d77b4c2afdb442b37924bc252793e106d9</id>
<content type='text'>
Connectivity checks have to traverse the entire object graph
in the worst case (e.g., a full clone or a full push). For
large repositories like linux.git, this can take 30-60
seconds, during which time git may produce little or no
output.

Let's add the option of showing progress, which is taken
care of by rev-list.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
