From: Junio C Hamano Date: Wed, 20 Jan 2016 19:43:35 +0000 (-0800) Subject: Merge branch 'ss/clone-depth-single-doc' X-Git-Tag: v2.8.0-rc0~109 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/85705cfb572878296f26a7fef0d174b5ec694161?ds=inline;hp=-c Merge branch 'ss/clone-depth-single-doc' Documentation for "git fetch --depth" has been updated for clarity. * ss/clone-depth-single-doc: docs: clarify that --depth for git-fetch works with newly initialized repos docs: say "commits" in the --depth option wording for git-clone docs: clarify that passing --depth to git-clone implies --single-branch --- 85705cfb572878296f26a7fef0d174b5ec694161 diff --combined Documentation/fetch-options.txt index 6b109f687a,fae1d78340..952dfdfef0 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@@ -8,10 -8,11 +8,11 @@@ option old data in `.git/FETCH_HEAD` will be overwritten. --depth=:: - Deepen or shorten the history of a 'shallow' repository created by - `git clone` with `--depth=` option (see linkgit:git-clone[1]) - to the specified number of commits from the tip of each remote - branch history. Tags for the deepened commits are not fetched. + Limit fetching to the specified number of commits from the tip of + each remote branch history. If fetching to a 'shallow' repository + created by `git clone` with `--depth=` option (see + linkgit:git-clone[1]), deepen or shorten the history to the specified + number of commits. Tags for the deepened commits are not fetched. --unshallow:: If the source repository is complete, convert a shallow @@@ -68,18 -69,10 +69,18 @@@ endif::git-pull[ By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following. The default - behavior for a remote may be specified with the remote..tagopt + behavior for a remote may be specified with the remote..tagOpt setting. See linkgit:git-config[1]. ifndef::git-pull[] +--refmap=:: + When fetching refs listed on the command line, use the + specified refspec (can be given more than once) to map the + refs to remote-tracking branches, instead of the values of + `remote.*.fetch` configuration variables for the remote + repository. See section on "Configured Remote-tracking + Branches" for details. + -t:: --tags:: Fetch all tags from the remote (i.e., fetch remote tags @@@ -100,13 -93,6 +101,13 @@@ reference to a commit that isn't already in the local submodule clone. +-j:: +--jobs=:: + Number of parallel children to be used for fetching submodules. + Each will fetch from different submodules, such that fetching many + submodules will be faster. By default submodules will be fetched + one at a time. + --no-recurse-submodules:: Disable recursive fetching of submodules (this has the same effect as using the '--recurse-submodules=no' option). diff --combined Documentation/git-clone.txt index 6bf000dac3,4df1af1230..789b668f77 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@@ -12,7 -12,7 +12,7 @@@ SYNOPSI 'git clone' [--template=] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] [-o ] [-b ] [-u ] [--reference ] - [--separate-git-dir ] + [--dissociate] [--separate-git-dir ] [--depth ] [--[no-]single-branch] [--recursive | --recurse-submodules] [--] [] @@@ -98,19 -98,7 +98,19 @@@ objects from the source repository int require fewer objects to be copied from the repository being cloned, reducing network and local storage costs. + -*NOTE*: see the NOTE for the `--shared` option. +*NOTE*: see the NOTE for the `--shared` option, and also the +`--dissociate` option. + +--dissociate:: + Borrow the objects from reference repositories specified + with the `--reference` options only to reduce network + transfer, and stop borrowing from them after a clone is made + by making necessary local copies of borrowed objects. This + option can also be used when cloning locally from a + repository that already borrows objects from another + repository--the new repository will borrow objects from the + same repository, and this option can be used to stop the + borrowing. --quiet:: -q:: @@@ -190,15 -178,14 +190,14 @@@ --depth :: Create a 'shallow' clone with a history truncated to the - specified number of revisions. + specified number of commits. Implies `--single-branch` unless + `--no-single-branch` is given to fetch the histories near the + tips of all branches. --[no-]single-branch:: Clone only the history leading to the tip of a single branch, either specified by the `--branch` option or the primary - branch remote's `HEAD` points at. When creating a shallow - clone with the `--depth` option, this is the default, unless - `--no-single-branch` is given to fetch the histories near the - tips of all branches. + branch remote's `HEAD` points at. Further fetches into the resulting repository will only update the remote-tracking branch for the branch this option was used for the initial cloning. If the HEAD at the remote did not point at any