diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-01-20 22:43:35 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-20 22:43:35 +0300 |
commit | 85705cfb572878296f26a7fef0d174b5ec694161 (patch) | |
tree | 5745cd13cb16587abe8c4e6a4699233297ccd50f /Documentation | |
parent | 76b620d8166bf4cc7cadbc61f9927799ceea9162 (diff) | |
parent | 60253a605d230a7fd2b32e77e94bd620c1399b72 (diff) |
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
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/fetch-options.txt | 9 | ||||
-rw-r--r-- | Documentation/git-clone.txt | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 6b109f687a..952dfdfef0 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -8,10 +8,11 @@ option old data in `.git/FETCH_HEAD` will be overwritten. --depth=<depth>:: - Deepen or shorten the history of a 'shallow' repository created by - `git clone` with `--depth=<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=<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 diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 6bf000dac3..789b668f77 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -190,15 +190,14 @@ objects from the source repository into a pack in the cloned repository. --depth <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 |