Merge branch 'ss/clone-depth-single-doc' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 5 Feb 2016 22:54:21 +0000 (14:54 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Feb 2016 22:54:22 +0000 (14:54 -0800)
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

1  2 
Documentation/fetch-options.txt
Documentation/git-clone.txt
index 45583d8454b4cae9bdb2ddb904c077cf1d3a1223,fae1d78340933d703a65049508dc9251c9b0396a..78cd2653cddb833466a69d9236aee2f81ca3dd30
@@@ -8,10 -8,11 +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
@@@ -68,18 -69,10 +69,18 @@@ endif::git-pull[
        By default, tags that point at objects that are downloaded
        from the remote repository are fetched and stored locally.
        This option disables this automatic tag following. The default
 -      behavior for a remote may be specified with the remote.<name>.tagopt
 +      behavior for a remote may be specified with the remote.<name>.tagOpt
        setting. See linkgit:git-config[1].
  
  ifndef::git-pull[]
 +--refmap=<refspec>::
 +      When fetching refs listed on the command line, use the
 +      specified refspec (can be given more than once) to map the
 +      refs to remote-tracking branches, instead of the values of
 +      `remote.*.fetch` configuration variables for the remote
 +      repository.  See section on "Configured Remote-tracking
 +      Branches" for details.
 +
  -t::
  --tags::
        Fetch all tags from the remote (i.e., fetch remote tags
index 6bf000dac348880cc2f5b8d3cb6825e7a1ca82b4,4df1af12308ab1fe26df39863341a611859fc6bd..789b668f7732957d71f42f98d361abd0b34305a7
@@@ -12,7 -12,7 +12,7 @@@ SYNOPSI
  'git clone' [--template=<template_directory>]
          [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
          [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
 -        [--separate-git-dir <git dir>]
 +        [--dissociate] [--separate-git-dir <git dir>]
          [--depth <depth>] [--[no-]single-branch]
          [--recursive | --recurse-submodules] [--] <repository>
          [<directory>]
@@@ -98,19 -98,7 +98,19 @@@ objects from the source repository int
        require fewer objects to be copied from the repository
        being cloned, reducing network and local storage costs.
  +
 -*NOTE*: see the NOTE for the `--shared` option.
 +*NOTE*: see the NOTE for the `--shared` option, and also the
 +`--dissociate` option.
 +
 +--dissociate::
 +      Borrow the objects from reference repositories specified
 +      with the `--reference` options only to reduce network
 +      transfer, and stop borrowing from them after a clone is made
 +      by making necessary local copies of borrowed objects.  This
 +      option can also be used when cloning locally from a
 +      repository that already borrows objects from another
 +      repository--the new repository will borrow objects from the
 +      same repository, and this option can be used to stop the
 +      borrowing.
  
  --quiet::
  -q::
  
  --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