summaryrefslogtreecommitdiff
path: root/Documentation/git-clone.txt
diff options
context:
space:
mode:
authorSebastian Schuberth <sschuberth@gmail.com>2016-01-06 13:06:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-01-07 19:45:19 (GMT)
commit28a1b56932c222b326e4ac0cd480d4e0be72fb1c (patch)
tree0b530bc26f1da30146ba3efd11f0606e779e7a5d /Documentation/git-clone.txt
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-28a1b56932c222b326e4ac0cd480d4e0be72fb1c.zip
git-28a1b56932c222b326e4ac0cd480d4e0be72fb1c.tar.gz
git-28a1b56932c222b326e4ac0cd480d4e0be72fb1c.tar.bz2
docs: clarify that passing --depth to git-clone implies --single-branch
It is confusing to document how --depth behaves as part of the --single-branch docs. Better move that part to the --depth docs, saying that it implies --single-branch by default. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-clone.txt')
-rw-r--r--Documentation/git-clone.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 0363d00..dd82714 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -178,15 +178,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 revisions. 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