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>
Sebastian Schuberth committed
Jan 6, 2016 at 14:06 UTC
28a1b56932c222b326e4ac0cd480d4e0be72fb1c
1 file changed
+4
-5
Documentation/git-clone.txt
+4
-5
@@ -178,15 +178,14 @@ objects from the source repository into a pack in the cloned repository.
178
179
--depth <depth>::
180
Create a 'shallow' clone with a history truncated to the
181
- specified number of revisions.
181
+ specified number of revisions. Implies `--single-branch` unless
182
+ `--no-single-branch` is given to fetch the histories near the
183
+ tips of all branches.
184
185
--[no-]single-branch::
186
Clone only the history leading to the tip of a single branch,
187
either specified by the `--branch` option or the primary
186
- branch remote's `HEAD` points at. When creating a shallow
187
- clone with the `--depth` option, this is the default, unless
188
- `--no-single-branch` is given to fetch the histories near the
189
- tips of all branches.
188
+ branch remote's `HEAD` points at.
189
Further fetches into the resulting repository will only update the
190
remote-tracking branch for the branch this option was used for the
191
initial cloning. If the HEAD at the remote did not point at any