All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Schuberth <sschuberth@gmail.com>
To: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] docs: clarify that --depth for git-fetch works with newly initialized repos
Date: Fri, 8 Jan 2016 10:32:52 +0100	[thread overview]
Message-ID: <568F8244.2030309@gmail.com> (raw)
In-Reply-To: <n6j1cs$p4$1@ger.gmane.org>

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.
---
 Documentation/fetch-options.txt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 45583d8..78cd265 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
-- 
2.7.0.windows.1

  parent reply	other threads:[~2016-01-08  9:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 12:30 Questions on passing --depth to git-clone vs. git-fetch Sebastian Schuberth
2016-01-06 12:41 ` Duy Nguyen
2016-01-06 13:04   ` Sebastian Schuberth
2016-01-06 13:06     ` [PATCH] docs: clarify that passing --depth to git-clone implies --single-branch Sebastian Schuberth
2016-01-07 19:45       ` Junio C Hamano
2016-01-08  9:18 ` [PATCH] docs: say "commits" in the --depth option wording for git-clone Sebastian Schuberth
2016-01-13 18:22   ` Sebastian Schuberth
2016-01-08  9:32 ` Sebastian Schuberth [this message]
2016-01-13 18:24   ` [PATCH] docs: clarify that --depth for git-fetch works with newly initialized repos Sebastian Schuberth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=568F8244.2030309@gmail.com \
    --to=sschuberth@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.