git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: About *git clone --depth=n* puzzle

From
XinLingchao <douglarek@outlook.com>
Date
Aug 14, 2013, 12:45 UTC
Message-ID
<BAY169-W3481BBD06C4449E7C5D6F5B4450@phx.gbl>
In-Reply-To
<20130814115956.GA29295@sigill.intra.peff.net>
Peff, thanks for your detial explain,  and I think I have got the point :P
-Lingchao Xin
----------------------------------------
Show 31 quoted lines
> Date: Wed, 14 Aug 2013 07:59:56 -0400
> From: peff@peff.net
> To: douglarek@outlook.com
> CC: stefanbeller@googlemail.com; git@vger.kernel.org; junchunx.guan@gmail.com
> Subject: Re: About *git clone --depth=n* puzzle
>
> 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 		 	   		  
Previous: Jeff KingNext: Duy Nguyen
Message 5 of 6 in “About *git clone --depth=n* puzzle”
  1. XinLingchaoAug 14, 2013
  2. Stefan BellerAug 14, 2013
  3. XinLingchaoAug 14, 2013
  4. Jeff KingAug 14, 2013
  5. XinLingchaoAug 14, 2013
  6. Duy NguyenAug 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.