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, 09:19 UTC
Message-ID
<BAY169-W647D5A2BFDC793ADFA5078B4450@phx.gbl>
In-Reply-To
<520B4529.9080304@googlemail.com>
---------------------------------------
Show 63 quoted lines
> Date: Wed, 14 Aug 2013 10:51:53 +0200
> From: stefanbeller@googlemail.com
> To: douglarek@outlook.com
> CC: git@vger.kernel.org; junchunx.guan@gmail.com
> Subject: Re: About *git clone --depth=n* puzzle
>
> On 08/14/2013 10:20 AM, XinLingchao wrote:
>> Hi Guys,
>>
>> I think I have got some trouble when I use `git clone --depth=n` command. Take a real repo for example:
>>
>>
>> `git clone https://github.com/douglarek/vimrc.git --depth=1`
>>
>>
>> then I use `git log`:
>>
>> ```
>> commit d04ca09ecc723739123fae11ad56784eb0c9b36a
>> Author: Lingchao Xin <douglarek@outlook.com>
>> Date: Fri Jun 7 09:39:22 2013 +0800
>>
>> Update vnudle to master branch, add wm shortcut, pylint optimization
>>
>> commit c66d827dc212f6ae8aab6b5c44631564bcbe2acd
>> Author: icocoa <lingchax@outlook.com>
>> Date: Tue Mar 12 01:36:34 2013 -0700
>>
>> Merge pull request #1 from douglarek/master
>>
>> Add markdown, flake8, pylint plugin
>>
>> ```
>> but when I clone it with `file://`:
>>
>> git clone https://github.com/douglarek/vimrc.git
>> git clone file://vimrc.git --depth=1 vimrc1
>>
>> I got this log:
>> ```
>> commit d04ca09ecc723739123fae11ad56784eb0c9b36a
>> Author: Lingchao Xin <douglarek@outlook.com>
>> Date: Fri Jun 7 09:39:22 2013 +0800
>>
>> Update vnudle to master branch, add wm shortcut, pylint optimization
>> ```
>>
>> so the two results are not same, is it a bug? or it should be so?
>>
>> My os is openSUSE 12.3 and git version 1.8.3.4; and myabe it occured in git 1.8.1.4 +.
>>
>>
>> Thanks and Best regards
>>
>> Lingchao Xin --
>
> 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
>
>
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.
cheers
Lingchao Xin 		 	   		  
Previous: Stefan BellerNext: Jeff King
Message 3 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.