All of lore.kernel.org
 help / color / mirror / Atom feed
* does clone --depth work?
@ 2009-11-29 16:03 Dan Carpenter
  2009-11-29 16:32 ` Björn Steinbrink
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2009-11-29 16:03 UTC (permalink / raw)
  To: git

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?

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: does clone --depth work?
  2009-11-29 16:03 does clone --depth work? Dan Carpenter
@ 2009-11-29 16:32 ` Björn Steinbrink
  2009-11-30  8:18   ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Björn Steinbrink @ 2009-11-29 16:32 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: does clone --depth work?
  2009-11-29 16:32 ` Björn Steinbrink
@ 2009-11-30  8:18   ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2009-11-30  8:18 UTC (permalink / raw)
  To: Björn Steinbrink; +Cc: git

On Sun, Nov 29, 2009 at 05:32:42PM +0100, Björn Steinbrink wrote:
> 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
> 

Awesome.  That does work.

thanks,
dan

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-30  8:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-29 16:03 does clone --depth work? Dan Carpenter
2009-11-29 16:32 ` Björn Steinbrink
2009-11-30  8:18   ` Dan Carpenter

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.