From: Jeff King <peff@peff.net>
To: XinLingchao <douglarek@outlook.com>
Cc: Stefan Beller <stefanbeller@googlemail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
"junchunx.guan@gmail.com" <junchunx.guan@gmail.com>
Subject: Re: About *git clone --depth=n* puzzle
Date: Wed, 14 Aug 2013 07:59:56 -0400 [thread overview]
Message-ID: <20130814115956.GA29295@sigill.intra.peff.net> (raw)
In-Reply-To: <BAY169-W647D5A2BFDC793ADFA5078B4450@phx.gbl>
On Wed, Aug 14, 2013 at 05:19:36PM +0800, XinLingchao wrote:
> > There was a similar discussion going on in July this year,
> > maybe this is an interesting read with respect to this topic
> > http://www.spinics.net/lists/git/msg196138.html
> >
> Stefan, I do NOT think so, the key point is not about the depth limit,
> it is about whether remote clone depth equals local clone depth.
I do not think it is about local vs remote, but rather about which
version of git the remote side is running. Prior to 682c7d2
(upload-pack: fix off-by-one depth calculation in shallow clone,
2013-01-11), a shallow clone always returned one extra commit. That fix
went into v1.8.2.
So if you have a post-v1.8.2 git client, a local clone will use the same
git version as the "remote" side of the connection. But if you are
contacting a remote server, the results you get will depend on what
version of git is running on the remote server.
And as the example you showed uses github.com as the remote, and as I
happen to know that GitHub's servers do not currently have 682c7d2, you
would see the old behavior.
-Peff
next prev parent reply other threads:[~2013-08-14 12:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 8:20 About *git clone --depth=n* puzzle XinLingchao
2013-08-14 8:51 ` Stefan Beller
2013-08-14 9:19 ` XinLingchao
2013-08-14 11:59 ` Jeff King [this message]
2013-08-14 12:45 ` XinLingchao
2013-08-15 2:08 ` Duy Nguyen
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=20130814115956.GA29295@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=douglarek@outlook.com \
--cc=git@vger.kernel.org \
--cc=junchunx.guan@gmail.com \
--cc=stefanbeller@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).