<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/clone.c, branch v2.17.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.17.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.17.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-02-13T21:39:04Z</updated>
<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>Merge branch 'jk/abort-clone-with-existing-dest'</title>
<updated>2018-01-23T21:16:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-01-23T21:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=addd37cd64e109eb0224e522869962519224cc78'/>
<id>urn:sha1:addd37cd64e109eb0224e522869962519224cc78</id>
<content type='text'>
"git clone $there $here" is allowed even when here directory exists
as long as it is an empty directory, but the command incorrectly
removed it upon a failure of the operation.

* jk/abort-clone-with-existing-dest:
  clone: do not clean up directories we didn't create
  clone: factor out dir_exists() helper
  t5600: modernize style
  t5600: fix outdated comment about unborn HEAD
</content>
</entry>
<entry>
<title>clone: do not clean up directories we didn't create</title>
<updated>2018-01-03T21:33:49Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-01-02T21:11:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d45420c1c8612f085f1901c33ff6f0ccfbb72d3b'/>
<id>urn:sha1:d45420c1c8612f085f1901c33ff6f0ccfbb72d3b</id>
<content type='text'>
Once upon a time, git-clone would refuse to write into a
directory that it did not itself create. The cleanup
routines for a failed clone could therefore just remove the
git and worktree dirs completely.

In 55892d2398 (Allow cloning to an existing empty directory,
2009-01-11), we learned to write into an existing directory.
Which means that doing:

  mkdir foo
  git clone will-fail foo

ends up deleting foo. This isn't a huge catastrophe, since
by definition foo must be empty. But it's somewhat
confusing; we should leave the filesystem as we found it.

Because we know that the only directory we'll write into is
an empty one, we can handle this case by just passing the
KEEP_TOPLEVEL flag to our recursive delete (if we could
write into populated directories, we'd have to keep track of
what we wrote and what we did not, which would be much
harder).

Note that we need to handle the work-tree and git-dir
separately, though, as only one might exist (and the new
tests in t5600 cover all cases).

Reported-by: Stephan Janssen &lt;sjanssen@you-get.com&gt;
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: factor out dir_exists() helper</title>
<updated>2018-01-03T21:33:05Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-01-02T21:10:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f9e377adc0b1ed06e35d2c77a6c9f2687c5b950b'/>
<id>urn:sha1:f9e377adc0b1ed06e35d2c77a6c9f2687c5b950b</id>
<content type='text'>
Two parts of git-clone's setup logic check whether a
directory exists, and they both call stat directly with the
same scratch "struct stat" buffer. Let's pull that into a
helper, which has a few advantages:

  - it makes the purpose of the stat calls more obvious

  - it makes it clear that we don't care about the
    information in "buf" remaining valid

  - if we later decide to make the check more robust (e.g.,
    complaining about non-directories), we can do it in one
    place

Note that we could just use file_exists() for this, which
has identical code. But we specifically care about
directories, so this future-proofs us against that function
later getting more picky about seeing actual files.

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>Merge branch 'jt/transport-hide-vtable'</title>
<updated>2017-12-28T22:08:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-12-28T22:08:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2546de27c31c65cd4a94782cc9939a662d7f837c'/>
<id>urn:sha1:2546de27c31c65cd4a94782cc9939a662d7f837c</id>
<content type='text'>
Code clean-up.

* jt/transport-hide-vtable:
  transport: make transport vtable more private
  clone, fetch: remove redundant transport check
</content>
</entry>
<entry>
<title>Merge branch 'es/clone-shared-worktree'</title>
<updated>2017-12-27T19:16:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-12-27T19:16:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=237aa99cd26da4daf9b2e75914ae17ecc9051f0c'/>
<id>urn:sha1:237aa99cd26da4daf9b2e75914ae17ecc9051f0c</id>
<content type='text'>
"git clone --shared" to borrow from a (secondary) worktree did not
work, even though "git clone --local" did.  Both are now accepted.

* es/clone-shared-worktree:
  clone: support 'clone --shared' from a worktree
</content>
</entry>
<entry>
<title>clone, fetch: remove redundant transport check</title>
<updated>2017-12-14T22:28:02Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2017-12-14T21:44:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=245abe34ac0622b349470b89d4b76a082a133cab'/>
<id>urn:sha1:245abe34ac0622b349470b89d4b76a082a133cab</id>
<content type='text'>
Prior to commit a2d725b7bdf7 ("Use an external program to implement
fetching with curl", 2009-08-05), if Git was compiled with NO_CURL, the
get_refs_list and fetch methods in struct transport might not be
populated, hence the checks in clone and fetch. After that commit, all
transports populate get_refs_list and fetch, making the checks in clone
and fetch redundant. Remove those checks.

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>clone: support 'clone --shared' from a worktree</title>
<updated>2017-12-12T00:05:50Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2017-12-11T23:16:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3b05971c1e51bb991c768fb8cead2c0501fa93e'/>
<id>urn:sha1:b3b05971c1e51bb991c768fb8cead2c0501fa93e</id>
<content type='text'>
When worktree functionality was originally implemented, the possibility
of 'clone --local' from within a worktree was overlooked, with the
result that the location of the "objects" directory of the source
repository was computed incorrectly, thus the objects could not be
copied or hard-linked by the clone. This shortcoming was addressed by
744e469755 (clone: allow --local from a linked checkout, 2015-09-28).

However, the related case of 'clone --shared' (despite being handled
only a few lines away from the 'clone --local' case) was not fixed by
744e469755, with a similar result of the "objects" directory location
being incorrectly computed for insertion into the 'alternates' file.
Fix this.

Reported-by: Marc-André Lureau &lt;marcandre.lureau@gmail.com&gt;
Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: partial clone</title>
<updated>2017-12-08T17:58:51Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2017-12-08T15:58:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=548719fbdc4ccd5d678afafbb5e3b5c8dac28489'/>
<id>urn:sha1:548719fbdc4ccd5d678afafbb5e3b5c8dac28489</id>
<content type='text'>
Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/tidy-ref-update-flags'</title>
<updated>2017-11-15T03:14:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-15T03:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a97222978ab3e0e86e87dccacf59269a9060de9e'/>
<id>urn:sha1:a97222978ab3e0e86e87dccacf59269a9060de9e</id>
<content type='text'>
Code clean-up in refs API implementation.

* mh/tidy-ref-update-flags:
  refs: update some more docs to use "oid" rather than "sha1"
  write_packed_entry(): take `object_id` arguments
  refs: rename constant `REF_ISPRUNING` to `REF_IS_PRUNING`
  refs: rename constant `REF_NODEREF` to `REF_NO_DEREF`
  refs: tidy up and adjust visibility of the `ref_update` flags
  ref_transaction_add_update(): remove a check
  ref_transaction_update(): die on disallowed flags
  prune_ref(): call `ref_transaction_add_update()` directly
  files_transaction_prepare(): don't leak flags to packed transaction
</content>
</entry>
</feed>
