git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Dan Carpenter <error27@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: does clone --depth work?
Date: Sun, 29 Nov 2009 17:32:42 +0100	[thread overview]
Message-ID: <20091129163242.GA7921@atjola.homenet> (raw)
In-Reply-To: <20091129160352.GO10640@bicker>

On 2009.11.29 18:03:52 +0200, Dan Carpenter wrote:
> I do: `git clone --depth 0 ./repo1/ repo2`  I expected that 
> "git log" in repo2 wouldn't show any revisions, but it does.
> 
> I'm using 1.6.5.3.171.ge36e.dirty (small unrelated modification).
> 
> Am I doing something incorrectly?

Two problems:
a) IIRC depth = 0 is like not specifying depth at all
b) When using plain paths, clone optimizes the process by just doing a
copy, that doesn't apply the depth setting at all

git clone --depth=1 file://$PWD/repo1 repo2

That should work. Of course you still got some commits, so "git log"
will show them. You just don't get all of them, but only to a certain
depth.

Björn

  reply	other threads:[~2009-11-29 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-29 16:03 does clone --depth work? Dan Carpenter
2009-11-29 16:32 ` Björn Steinbrink [this message]
2009-11-30  8:18   ` Dan Carpenter

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=20091129163242.GA7921@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=error27@gmail.com \
    --cc=git@vger.kernel.org \
    /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).