<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/clone.c, branch v2.6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.6.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-11-05T20:18:08Z</updated>
<entry>
<title>Merge branch 'nd/clone-linked-checkout' into maint</title>
<updated>2015-11-05T20:18:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-11-05T20:18:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4349f597f08b6dc50fc6198b8e1b96e19df37c65'/>
<id>urn:sha1:4349f597f08b6dc50fc6198b8e1b96e19df37c65</id>
<content type='text'>
It was not possible to use a repository-lookalike created by "git
worktree add" as a local source of "git clone".

* nd/clone-linked-checkout:
  clone: better error when --reference is a linked checkout
  clone: allow --local from a linked checkout
  enter_repo: allow .git files in strict mode
  enter_repo: avoid duplicating logic, use is_git_directory() instead
  t0002: add test for enter_repo(), non-strict mode
  path.c: delete an extra space
</content>
</entry>
<entry>
<title>Merge branch 'js/clone-dissociate' into maint</title>
<updated>2015-11-03T23:32:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-11-03T23:32:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f836a32ba75beded3bca960f2918e08309642c62'/>
<id>urn:sha1:f836a32ba75beded3bca960f2918e08309642c62</id>
<content type='text'>
"git clone --dissociate" runs a big "git repack" process at the
end, and it helps to close file descriptors that are open on the
packs and their idx files before doing so on filesystems that
cannot remove a file that is still open.

* js/clone-dissociate:
  clone --dissociate: avoid locking pack files
  sha1_file.c: add a function to release all packs
  sha1_file: consolidate code to close a pack's file descriptor
  t5700: demonstrate a Windows file locking issue with `git clone --dissociate`
</content>
</entry>
<entry>
<title>clone --dissociate: avoid locking pack files</title>
<updated>2015-10-07T17:47:50Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2015-10-06T13:18:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=786b150c8d0960cb7c36fb1cbbf70dbd76b586de'/>
<id>urn:sha1:786b150c8d0960cb7c36fb1cbbf70dbd76b586de</id>
<content type='text'>
When `git clone` is asked to dissociate the repository from the
reference repository whose objects were used, it is quite possible that
the pack files need to be repacked. In that case, the pack files need to
be deleted that were originally hard-links to the reference repository's
pack files.

On platforms where a file cannot be deleted if another process still
holds a handle on it, we therefore need to take pains to release all
pack files and indexes before dissociating.

This fixes https://github.com/git-for-windows/git/issues/446

The test case to demonstrate the breakage technically does not need to
be run on Linux or MacOSX. It won't hurt, either, though.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: better error when --reference is a linked checkout</title>
<updated>2015-09-28T17:46:36Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2015-09-28T13:06:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d78db8424ec5c3f3327441cd1a897064af39da91'/>
<id>urn:sha1:d78db8424ec5c3f3327441cd1a897064af39da91</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: allow --local from a linked checkout</title>
<updated>2015-09-28T17:46:35Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2015-09-28T13:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=744e4697555d4982acf0862f8fa6b15dd4796c37'/>
<id>urn:sha1:744e4697555d4982acf0862f8fa6b15dd4796c37</id>
<content type='text'>
Noticed-by: Bjørnar Snoksrud &lt;snoksrud@gmail.com&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/git-path'</title>
<updated>2015-08-19T21:48:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-19T21:48:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8c9155e031869293b99531a25b585e49f74beaba'/>
<id>urn:sha1:8c9155e031869293b99531a25b585e49f74beaba</id>
<content type='text'>
git_path() and mkpath() are handy helper functions but it is easy
to misuse, as the callers need to be careful to keep the number of
active results below 4.  Their uses have been reduced.

* jk/git-path:
  memoize common git-path "constant" files
  get_repo_path: refactor path-allocation
  find_hook: keep our own static buffer
  refs.c: remove_empty_directories can take a strbuf
  refs.c: avoid git_path assignment in lock_ref_sha1_basic
  refs.c: avoid repeated git_path calls in rename_tmp_log
  refs.c: simplify strbufs in reflog setup and writing
  path.c: drop git_path_submodule
  refs.c: remove extra git_path calls from read_loose_refs
  remote.c: drop extraneous local variable from migrate_file
  prefer mkpathdup to mkpath in assignments
  prefer git_pathdup to git_path in some possibly-dangerous cases
  add_to_alternates_file: don't add duplicate entries
  t5700: modernize style
  cache.h: complete set of git_path_submodule helpers
  cache.h: clarify documentation for git_path, et al
</content>
</entry>
<entry>
<title>Merge branch 'ps/guess-repo-name-at-root'</title>
<updated>2015-08-19T21:48:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-19T21:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4bfab58ce2d47cef9236571cb1451bf3b62241c1'/>
<id>urn:sha1:4bfab58ce2d47cef9236571cb1451bf3b62241c1</id>
<content type='text'>
"git clone $URL", when cloning from a site whose sole purpose is to
host a single repository (hence, no path after &lt;scheme&gt;://&lt;site&gt;/),
tried to use the site name as the new repository name, but did not
remove username or password when &lt;site&gt; part was of the form
&lt;user&gt;@&lt;pass&gt;:&lt;host&gt;.  The code is taught to redact these.

* ps/guess-repo-name-at-root:
  clone: abort if no dir name could be guessed
  clone: do not use port number as dir name
  clone: do not include authentication data in guessed dir
</content>
</entry>
<entry>
<title>Merge branch 'jk/guess-repo-name-regression-fix'</title>
<updated>2015-08-19T21:48:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-19T21:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8259da5ea3d993aa8b783a5039f5a78d86312c65'/>
<id>urn:sha1:8259da5ea3d993aa8b783a5039f5a78d86312c65</id>
<content type='text'>
"git clone $URL" in recent releases of Git contains a regression in
the code that invents a new repository name incorrectly based on
the $URL.  This has been corrected.

* jk/guess-repo-name-regression-fix:
  clone: use computed length in guess_dir_name
  clone: add tests for output directory
</content>
</entry>
<entry>
<title>get_repo_path: refactor path-allocation</title>
<updated>2015-08-10T22:37:14Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-08-10T09:37:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0ea68e429647cc5400fe8fa257056083b0a6459d'/>
<id>urn:sha1:0ea68e429647cc5400fe8fa257056083b0a6459d</id>
<content type='text'>
The get_repo_path function calls mkpath() and then does some
non-trivial operations on it, like calling
is_git_directory() and read_gitfile(). These are actually
OK (they do not use more pathname static buffers
themselves), but it takes a fair bit of work to verify.

Let's use our own strbuf to store the path, and we can
simply reuse it for each iteration of the loop (we can even
avoid rewriting the beginning part, since we are trying a
series of suffixes).

To make the strbuf cleanup easier, we split out a thin
wrapper. As a bonus, this wrapper can factor out the
canonicalization that happens in all of the early-return
code paths.

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: abort if no dir name could be guessed</title>
<updated>2015-08-10T18:02:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2015-08-10T15:48:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=adef9561f0c8cf2c974d78adac0ae236e159e49f'/>
<id>urn:sha1:adef9561f0c8cf2c974d78adac0ae236e159e49f</id>
<content type='text'>
Due to various components of the URI being stripped off it may
happen that we fail to guess a directory name. We currently error
out with a message that it is impossible to create the working
tree '' in such cases. Instead, error out early with a sensible
error message hinting that a directory name should be specified
manually on the command line.

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