summaryrefslogtreecommitdiff
path: root/Documentation/fetch-options.txt
diff options
context:
space:
mode:
authorSebastian Schuberth <sschuberth@gmail.com>2016-01-08 09:32:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-01-08 20:40:12 (GMT)
commit60253a605d230a7fd2b32e77e94bd620c1399b72 (patch)
tree0b4d2c93f1dd86f50442187b16750371e0e4cde7 /Documentation/fetch-options.txt
parentfc142811d14d3acb64d1c2057a774fa1573e60cb (diff)
downloadgit-60253a605d230a7fd2b32e77e94bd620c1399b72.zip
git-60253a605d230a7fd2b32e77e94bd620c1399b72.tar.gz
git-60253a605d230a7fd2b32e77e94bd620c1399b72.tar.bz2
docs: clarify that --depth for git-fetch works with newly initialized repos
The original wording sounded as if --depth could only be used to deepen or shorten the history of existing repos. However, that is not the case. In a workflow like $ git init $ git remote add origin https://github.com/git/git.git $ git fetch --depth=1 The newly initialized repo is properly created as a shallow repo. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/fetch-options.txt')
-rw-r--r--Documentation/fetch-options.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 92c68c3..fae1d78 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