<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-clone.txt, branch v2.16.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.16.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.16.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-12-05T19:30:38Z</updated>
<entry>
<title>Documentation/git-clone: improve description for submodule recursing</title>
<updated>2017-12-05T19:30:38Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2017-12-05T02:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc29b0b9710322ea966a685903e4334a61931fc5'/>
<id>urn:sha1:bc29b0b9710322ea966a685903e4334a61931fc5</id>
<content type='text'>
There have been a few complaints on the mailing list that git-clone doesn't
respect the `submodule.recurse` setting, which every other command (that
potentially knows how to deal with submodules) respects.  In case of clone
this is not beneficial to respect as the user may not want to obtain all
submodules (assuming a pathspec of '.').

Improve the documentation such that the pathspec is mentioned in the
synopsis to alleviate the confusion around the submodule recursion flag
in git-clone.

While at it clarify that the option can be given multiple times for complex
pathspecs.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: add a --no-tags option to clone without tags</title>
<updated>2017-05-01T02:09:44Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2017-04-26T23:12:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0dab2468ee5bbfaa854a22eb17c70647fc8b6b83'/>
<id>urn:sha1:0dab2468ee5bbfaa854a22eb17c70647fc8b6b83</id>
<content type='text'>
Add a --no-tags option to clone without fetching any tags.

Without this change there's no easy way to clone a repository without
also fetching its tags.

When supplying --single-branch the primary remote branch will be
cloned, but in addition tags will be followed &amp; retrieved. Now
--no-tags can be added --single-branch to clone a repository without
tags, and which only tracks a single upstream branch.

This option works without --single-branch as well, and will do a
normal clone but not fetch any tags.

Many git commands pay some fixed overhead as a function of the number
of references. E.g. creating ~40k tags in linux.git will cause a
command like `git log -1 &gt;/dev/null` to run in over a second instead
of in a matter of milliseconds, in addition numerous other things will
slow down, e.g. "git log &lt;TAB&gt;" with the bash completion will slowly
show ~40k references instead of 1.

The user might want to avoid all of that overhead to simply use a
repository like that to browse the "master" branch, or something like
a CI tool might want to keep that one branch up-to-date without caring
about any other references.

Without this change the only way of accomplishing this was either by
manually tweaking the config in a fresh repository:

    git init git &amp;&amp;
    cat &gt;git/.git/config &lt;&lt;EOF &amp;&amp;
    [remote "origin"]
        url = git@github.com:git/git.git
        tagOpt = --no-tags
        fetch = +refs/heads/master:refs/remotes/origin/master
    [branch "master"]
        remote = origin
        merge = refs/heads/master
    EOF
    cd git &amp;&amp;
    git pull

Which requires hardcoding the "master" name, which may not be the main
--single-branch would have retrieved, or alternatively by setting
tagOpt=--no-tags right after cloning &amp; deleting any existing tags:

    git clone --single-branch git@github.com:git/git.git &amp;&amp;
    cd git &amp;&amp;
    git config remote.origin.tagOpt --no-tags &amp;&amp;
    git tag -l | xargs git tag -d

Which of course was also subtly buggy if --branch was pointed at a
tag, leaving the user in a detached head:

    git clone --single-branch --branch v2.12.0 git@github.com:git/git.git &amp;&amp;
    cd git &amp;&amp;
    git config remote.origin.tagOpt --no-tags &amp;&amp;
    git tag -l | xargs git tag -d

Now all this complexity becomes the much simpler:

    git clone --single-branch --no-tags git@github.com:git/git.git

Or in the case of cloning a single tag "branch":

    git clone --single-branch --branch v2.12.0 --no-tags git@github.com:git/git.git

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: teach --recurse-submodules to optionally take a pathspec</title>
<updated>2017-03-18T16:51:23Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-03-17T22:38:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb62e0a99fcbb9ceb03502bf2168d2e57530214f'/>
<id>urn:sha1:bb62e0a99fcbb9ceb03502bf2168d2e57530214f</id>
<content type='text'>
Teach clone --recurse-submodules to optionally take a pathspec argument
which describes which submodules should be recursively initialized and
cloned.  If no pathspec is provided, --recurse-submodules will
recursively initialize and clone all submodules by using a default
pathspec of ".".  In order to construct more complex pathspecs,
--recurse-submodules can be given multiple times.

This also configures the 'submodule.active' configuration option to be
the given pathspec, such that any future invocation of `git submodule
update` will keep up with the pathspec.

Additionally the switch '--recurse' is removed from the Documentation as
well as marked hidden in the options array, to streamline the options
for submodules.  A simple '--recurse' doesn't convey what is being
recursed, e.g. it could mean directories or trees (c.f. ls-tree) In a
lot of other commands we already have '--recurse-submodules' to mean
recursing into submodules, so advertise this spelling here as the
genuine option.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/shallow-deepen'</title>
<updated>2016-10-10T21:03:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-10T21:03:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a460ea4a3cb1dad253604b5e2aeaa161637453a9'/>
<id>urn:sha1:a460ea4a3cb1dad253604b5e2aeaa161637453a9</id>
<content type='text'>
The existing "git fetch --depth=&lt;n&gt;" option was hard to use
correctly when making the history of an existing shallow clone
deeper.  A new option, "--deepen=&lt;n&gt;", has been added to make this
easier to use.  "git clone" also learned "--shallow-since=&lt;date&gt;"
and "--shallow-exclude=&lt;tag&gt;" options to make it easier to specify
"I am interested only in the recent N months worth of history" and
"Give me only the history since that version".

* nd/shallow-deepen: (27 commits)
  fetch, upload-pack: --deepen=N extends shallow boundary by N commits
  upload-pack: add get_reachable_list()
  upload-pack: split check_unreachable() in two, prep for get_reachable_list()
  t5500, t5539: tests for shallow depth excluding a ref
  clone: define shallow clone boundary with --shallow-exclude
  fetch: define shallow boundary with --shallow-exclude
  upload-pack: support define shallow boundary by excluding revisions
  refs: add expand_ref()
  t5500, t5539: tests for shallow depth since a specific date
  clone: define shallow clone boundary based on time with --shallow-since
  fetch: define shallow boundary with --shallow-since
  upload-pack: add deepen-since to cut shallow repos based on time
  shallow.c: implement a generic shallow boundary finder based on rev-list
  fetch-pack: use a separate flag for fetch in deepening mode
  fetch-pack.c: mark strings for translating
  fetch-pack: use a common function for verbose printing
  fetch-pack: use skip_prefix() instead of starts_with()
  upload-pack: move rev-list code out of check_non_tip()
  upload-pack: make check_non_tip() clean things up on error
  upload-pack: tighten number parsing at "deepen" lines
  ...
</content>
</entry>
<entry>
<title>clone: implement optional references</title>
<updated>2016-08-15T22:28:45Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2016-08-15T21:53:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f7415b4d71150d5c2d52f87c8792591237aaf00e'/>
<id>urn:sha1:f7415b4d71150d5c2d52f87c8792591237aaf00e</id>
<content type='text'>
In a later patch we want to try to create alternates for submodules,
but they might not exist in the referenced superproject. So add a way
to skip the non existing references and report them.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/clone-shallow-passthru'</title>
<updated>2016-07-06T20:38:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-06T20:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9f1027d18a23e7c2ae60d3fb0a943e7b3342c532'/>
<id>urn:sha1:9f1027d18a23e7c2ae60d3fb0a943e7b3342c532</id>
<content type='text'>
Fix an unintended regression in v2.9 that breaks "clone --depth"
that recurses down to submodules by forcing the submodules to also
be cloned shallowly, which many server instances that host upstream
of the submodules are not prepared for.

* sb/clone-shallow-passthru:
  clone: do not let --depth imply --shallow-submodules
</content>
</entry>
<entry>
<title>clone: do not let --depth imply --shallow-submodules</title>
<updated>2016-06-20T18:35:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-06-19T20:51:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=18a74a092bff41f1ffe10bd2463d3eed9a04435d'/>
<id>urn:sha1:18a74a092bff41f1ffe10bd2463d3eed9a04435d</id>
<content type='text'>
In v2.9.0, we prematurely flipped the default to force cloning
submodules shallowly, when the superproject is getting cloned
shallowly.  This is likely to fail when the upstream repositories
submodules are cloned from a repository that is not prepared to
serve histories that ends at a commit that is not at the tip of a
branch, and we know the world is not yet ready.

Use a safer default to clone the submodules fully, unless the user
tells us that she knows that the upstream repository of the
submodules are willing to cooperate with "--shallow-submodules"
option.

Noticed-by: Vadim Eisenberg &lt;VADIME@il.ibm.com&gt;
Helped-by: Jeff King &lt;peff@peff.net&gt;
Helped-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>clone: define shallow clone boundary with --shallow-exclude</title>
<updated>2016-06-13T21:38:16Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-06-12T10:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=859e5df916cc3f3cba920c527f485ffaf6d7efa9'/>
<id>urn:sha1:859e5df916cc3f3cba920c527f485ffaf6d7efa9</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: define shallow clone boundary based on time with --shallow-since</title>
<updated>2016-06-13T21:38:16Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-06-12T10:54:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=994c2aaf31e1f8e8e69f86324e585620fee68c82'/>
<id>urn:sha1:994c2aaf31e1f8e8e69f86324e585620fee68c82</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>Merge branch 'sb/clone-shallow-passthru'</title>
<updated>2016-05-06T21:45:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-05-06T21:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f3b21c1119abc7e19c988b399c7726d47bbb0d1'/>
<id>urn:sha1:5f3b21c1119abc7e19c988b399c7726d47bbb0d1</id>
<content type='text'>
"git clone" learned "--shallow-submodules" option.

* sb/clone-shallow-passthru:
  clone: add `--shallow-submodules` flag
</content>
</entry>
</feed>
