docs: clarify that passing --depth to git-clone implies --single-branch
authorSebastian Schuberth <sschuberth@gmail.com>
Wed, 6 Jan 2016 13:06:47 +0000 (14:06 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Jan 2016 19:45:19 +0000 (11:45 -0800)
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>
Documentation/git-clone.txt
index 0363d0039b274093e6d230a83fcf99c3ff6700d8..dd8271478a2202b1074f3d5d716cedec88cc833d 100644 (file)
@@ -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
 
 --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
 
 --[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
        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