<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/clone.c, branch v1.8.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.8.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.8.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-02-01T20:39:37Z</updated>
<entry>
<title>Merge branch 'jc/no-git-config-in-clone'</title>
<updated>2013-02-01T20:39:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-02-01T20:39:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba96aa67be5a85a7f7a61e967c16e38d077fce88'/>
<id>urn:sha1:ba96aa67be5a85a7f7a61e967c16e38d077fce88</id>
<content type='text'>
We stopped paying attention to $GIT_CONFIG environment that points
at a single configuration file from any command other than "git config"
quite a while ago, but "git clone" internally set, exported, and
then unexported the variable during its operation unnecessarily.

* jc/no-git-config-in-clone:
  clone: do not export and unexport GIT_CONFIG
</content>
</entry>
<entry>
<title>Merge branch 'nd/clone-no-separate-git-dir-with-bare'</title>
<updated>2013-01-22T04:15:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-22T04:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=68434e287988f697a6565cb4666598bd8033f46f'/>
<id>urn:sha1:68434e287988f697a6565cb4666598bd8033f46f</id>
<content type='text'>
Forbid a useless combination of options to "git clone".

* nd/clone-no-separate-git-dir-with-bare:
  clone: forbid --bare --separate-git-dir &lt;dir&gt;
</content>
</entry>
<entry>
<title>clone: do not export and unexport GIT_CONFIG</title>
<updated>2013-01-11T22:57:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-11T22:43:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3f4f4cc0da03b312fabcd5a509baa8092de39534'/>
<id>urn:sha1:3f4f4cc0da03b312fabcd5a509baa8092de39534</id>
<content type='text'>
Earlier, dc87183 (use GIT_CONFIG only in "git config", not other
programs, 2008-06-30) made sure that the environment variable is
never used outside "git config", but "git clone", after creating a
directory for the new repository and until the init_db() function
populates its .git/ directory, exported the variable for no good
reason.  No hook will run from init_db() and more importantly no
hook can run until init_db() finishes creation of the new
repository, so it cannot be used by any invocation of "git config"
by definition.

Stop doing the useless export/unexport.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: forbid --bare --separate-git-dir &lt;dir&gt;</title>
<updated>2013-01-11T03:13:17Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-01-11T03:09:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=95b63f1ebb1d2b1ae34238cac331dd1e6e437975'/>
<id>urn:sha1:95b63f1ebb1d2b1ae34238cac331dd1e6e437975</id>
<content type='text'>
The --separate-git-dir option was introduced to make it simple to put
the git directory somewhere outside the worktree, for example when
cloning a repository for use as a submodule.

It was not intended for use when creating a bare repository. In that
case there is no worktree and it is more natural to directly clone the
repository and create a .git file as separate steps:

        git clone --bare /path/to/repo.git bar.git
        printf 'gitdir: bar.git\n' &gt;foo.git

Forbid the combination, making the command easier to explain.

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 'jl/interrupt-clone-remove-separate-git-dir'</title>
<updated>2013-01-10T21:47:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-10T21:47:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=63d1cf6526a51d72f5c14cf9f8c72d3cc37762bb'/>
<id>urn:sha1:63d1cf6526a51d72f5c14cf9f8c72d3cc37762bb</id>
<content type='text'>
When "git clone --separate-git-dir" is interrupted, we failed to
remove the real location we created the repository.

* jl/interrupt-clone-remove-separate-git-dir:
  clone: support atomic operation with --separate-git-dir
</content>
</entry>
<entry>
<title>clone: support atomic operation with --separate-git-dir</title>
<updated>2013-01-06T06:44:11Z</updated>
<author>
<name>Jens Lehmann</name>
<email>Jens.Lehmann@web.de</email>
</author>
<published>2013-01-05T20:17:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9be1980bb966cb1bc187b62803e6b76087fd5aac'/>
<id>urn:sha1:9be1980bb966cb1bc187b62803e6b76087fd5aac</id>
<content type='text'>
Since b57fb80a7d (init, clone: support --separate-git-dir for .git file)
git clone supports the --separate-git-dir option to create the git dir
outside the work tree. But when that option is used, the git dir won't be
deleted in case the clone fails like it would be without this option. This
makes clone lose its atomicity as in case of a failure a partly set up git
dir is left behind. A real world example where this leads to problems is
when "git submodule update" fails to clone a submodule and later calls to
"git submodule update" stumble over the partially set up git dir and try
to revive the submodule from there, which then fails with a not very user
friendly error message.

Fix that by updating the junk_git_dir variable (used to remember if and
what git dir should be removed in case of failure) to the new value given
with the --seperate-git-dir option. Also add a test for this to t5600 (and
while at it fix the former last test to not cd into a directory to test
for its existence but use "test -d" instead).

Reported-by: Manlio Perillo &lt;manlio.perillo@gmail.com&gt;
Signed-off-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rt/maint-clone-single' into maint</title>
<updated>2012-10-08T18:34:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-10-08T18:34:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9b4030cd98c7fa564905979d075aaf1312de8567'/>
<id>urn:sha1:9b4030cd98c7fa564905979d075aaf1312de8567</id>
<content type='text'>
A repository created with "git clone --single" had its fetch
refspecs set up just like a clone without "--single", leading the
subsequent "git fetch" to slurp all the other branches, defeating
the whole point of specifying "only this branch".

* rt/maint-clone-single:
  clone --single: limit the fetch refspec to fetched branch
</content>
</entry>
<entry>
<title>Merge branch 'rt/maint-clone-single'</title>
<updated>2012-10-01T19:58:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-10-01T19:58:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92f6e98c69670689c868452a91d9ed1c2c39eac2'/>
<id>urn:sha1:92f6e98c69670689c868452a91d9ed1c2c39eac2</id>
<content type='text'>
Running "git fetch" in a repository made with "git clone --single"
slurps all the branches, defeating the point of "--single".

* rt/maint-clone-single:
  clone --single: limit the fetch refspec to fetched branch
</content>
</entry>
<entry>
<title>clone --single: limit the fetch refspec to fetched branch</title>
<updated>2012-09-20T21:15:35Z</updated>
<author>
<name>Ralf Thielow</name>
<email>ralf.thielow@gmail.com</email>
</author>
<published>2012-09-20T18:04:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=31b808a03290a4f87c571cc1c61f26d8a03c7025'/>
<id>urn:sha1:31b808a03290a4f87c571cc1c61f26d8a03c7025</id>
<content type='text'>
After running "git clone --single", the resulting repository has the
usual default "+refs/heads/*:refs/remotes/origin/*" wildcard fetch
refspec installed, which means that a subsequent "git fetch" will
end up grabbing all the other branches.

Update the fetch refspec to cover only the singly cloned ref instead
to correct this.

That means:
If "--single" is used without "--branch" or "--mirror", the
fetch refspec covers the branch on which remote's HEAD points to.
If "--single" is used with "--branch", it'll cover only the branch
specified in the "--branch" option.
If "--single" is combined with "--mirror", then it'll cover all
refs of the cloned repository.
If "--single" is used with "--branch" that specifies a tag, then
it'll cover only the ref for this tag.

Signed-off-by: Ralf Thielow &lt;ralf.thielow@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rj/path-cleanup'</title>
<updated>2012-09-14T18:53:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-14T18:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8c11b25de41857e5a44325046dd55d3751f740c6'/>
<id>urn:sha1:8c11b25de41857e5a44325046dd55d3751f740c6</id>
<content type='text'>
* rj/path-cleanup:
  Call mkpathdup() rather than xstrdup(mkpath(...))
  Call git_pathdup() rather than xstrdup(git_path("..."))
  path.c: Use vsnpath() in the implementation of git_path()
  path.c: Don't discard the return value of vsnpath()
  path.c: Remove the 'git_' prefix from a file scope function
</content>
</entry>
</feed>
