Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-12-04 Thread Junio C Hamano
Stefan Beller writes: >> A single dot "." would be a possibility >> (i.e. a ref component cannot begin with a dot), but squating on it >> and saying "anything that begins with . must be followed by 40-hex >> (and in the future by an extended SHA-1)" would rob extensibility >>

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-12-04 Thread Junio C Hamano
Stefan Beller writes: > Did you have any reason to pick . specifically or are we welcome to bikeshed > why a colon might be better? (or ":", "?", "[", "\", "^", "~", SP, or TAB) > > We could use [id]c78f7b5ed9dc1c6edc8db06ac65860151d54fd07 > or

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-12-03 Thread Duy Nguyen
On Tue, Dec 1, 2015 at 11:22 PM, Junio C Hamano wrote: > As to ${sign}, I was tempted to say an empty string might be > sufficient (i.e. "do not use 40-hex as your branch name"), but it > probably is a bad idea. A single dot "." would be a possibility > (i.e. a ref component

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-12-03 Thread Stefan Beller
On Tue, Dec 1, 2015 at 2:22 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> I do not think you would need a new option for this, by the way. >> Just add a new syntax for the LFS of a refspec that cannot possibly >> be confused with existing choices

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-12-01 Thread Junio C Hamano
Duy Nguyen writes: > maybe > > git clone --commit-id repo (*) > > instead. Detached head is implied, and this way you don't have to > disambiguate sha-1 vs refname. And --commit-id can also be added in > git-fetch. Actually the git-fetch case is even more interesting, what >

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-12-01 Thread Junio C Hamano
Junio C Hamano writes: > I do not think you would need a new option for this, by the way. > Just add a new syntax for the LFS of a refspec that cannot possibly > be confused with existing choices of what can come there (i.e. an > empty string to denote deletion, or a partial

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-12-01 Thread Duy Nguyen
On Tue, Dec 1, 2015 at 1:47 AM, Stefan Beller wrote: > On Mon, Nov 30, 2015 at 10:11 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> +cc Junio, Duy >>> >>> So cloning from an arbitrary SHA1 is not a new thing I just came up

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-30 Thread Junio C Hamano
Stefan Beller writes: > +cc Junio, Duy > > So cloning from an arbitrary SHA1 is not a new thing I just came up with, > but has been discussed before[1]. > > Junio wrote on Oct 09, 2014: >> This is so non-standard a thing to do that I doubt it is worth >> supporting with "git

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-30 Thread Stefan Beller
On Mon, Nov 30, 2015 at 10:11 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> +cc Junio, Duy >> >> So cloning from an arbitrary SHA1 is not a new thing I just came up with, >> but has been discussed before[1]. >> >> Junio wrote on Oct 09, 2014: >>>

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-19 Thread Jeff King
On Wed, Nov 18, 2015 at 03:40:02PM -0800, Terry Parker wrote: > > +Terry, who did optimize the JGit implementation for bitmaps, > > as we also had a "lots of refs" hoarder repo, which underperformed > > before. > > The performance issue with the "hoarder" repo was that the bitmap > commit

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-18 Thread Duy Nguyen
On Tue, Nov 17, 2015 at 10:43 PM, Jeff King wrote: > On Tue, Nov 17, 2015 at 09:17:43PM +0100, Duy Nguyen wrote: > >> On Mon, Nov 16, 2015 at 8:25 PM, Stefan Beller wrote: >> > Instead of having to search all branches for the requested sha1, we could >> > have

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-18 Thread Stefan Beller
On Wed, Nov 18, 2015 at 1:11 PM, Jeff King wrote: > On Wed, Nov 18, 2015 at 01:32:36PM +0100, Duy Nguyen wrote: > >> Yeah I think that was the 10k commits in Shawn's mail: the number of >> commits we may have to walk until we hit a reachability bitmap. It >> looks like C Git will

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-18 Thread Jeff King
On Wed, Nov 18, 2015 at 01:32:36PM +0100, Duy Nguyen wrote: > Yeah I think that was the 10k commits in Shawn's mail: the number of > commits we may have to walk until we hit a reachability bitmap. It > looks like C Git will create a bitmap every 5k commits, not 10k, > though, if I read the code

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-17 Thread Duy Nguyen
On Mon, Nov 16, 2015 at 8:25 PM, Stefan Beller wrote: > Instead of having to search all branches for the requested sha1, we could have > some sort of data structure to make it not an O(n) operation (n being > all objects > in the repo). > > Maybe I overestimate the work which

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-17 Thread Stefan Beller
On Tue, Nov 17, 2015 at 12:39 PM, Jens Lehmann wrote: > Am 17.11.2015 um 21:04 schrieb Stefan Beller: >> >> On Tue, Nov 17, 2015 at 11:46 AM, Jens Lehmann >> wrote: >>> >>> >>> But for quite some time you'll have older servers out there that >>> don't

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-17 Thread Stefan Beller
On Tue, Nov 17, 2015 at 11:46 AM, Jens Lehmann wrote: > > But for quite some time you'll have older servers out there that > don't support fetching a single sha1 or aren't configured to do so. Only when talking about the open source side. If you have all the

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-17 Thread Jens Lehmann
Am 16.11.2015 um 23:56 schrieb Stefan Beller: On Mon, Nov 16, 2015 at 1:42 PM, Jens Lehmann wrote: Am 16.11.2015 um 20:25 schrieb Stefan Beller: On Mon, Nov 16, 2015 at 10:59 AM, Jens Lehmann wrote: Am 14.11.2015 um 01:10 schrieb Stefan Beller:

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-17 Thread Jens Lehmann
Am 17.11.2015 um 21:49 schrieb Stefan Beller: I assumed we'd have yet another flag to activate the new behavior, but if you want to roll out that new feature as a default, I agree on needing the fallback. Ah, I was under the impression that users are surprised by --depth not propagating into

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-17 Thread Jeff King
On Sun, Nov 15, 2015 at 01:53:31PM +0100, Lars Schneider wrote: > > Hrm. Do we want to make these workarounds work correctly? Or is the > > final solution going to be that the first command you gave simply works, > > and no workarounds are needed. If the latter, I wonder if we want to be > >

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-17 Thread Jeff King
On Tue, Nov 17, 2015 at 09:17:43PM +0100, Duy Nguyen wrote: > On Mon, Nov 16, 2015 at 8:25 PM, Stefan Beller wrote: > > Instead of having to search all branches for the requested sha1, we could > > have > > some sort of data structure to make it not an O(n) operation (n

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-16 Thread Jens Lehmann
Am 14.11.2015 um 01:10 schrieb Stefan Beller: On Fri, Nov 13, 2015 at 3:41 PM, Jeff King wrote: On Fri, Nov 13, 2015 at 06:38:07PM -0500, Jeff King wrote: On Fri, Nov 13, 2015 at 03:16:01PM -0800, Stefan Beller wrote: Junio wrote on Oct 09, 2014: This is so non-standard a

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-16 Thread Jens Lehmann
Am 16.11.2015 um 20:25 schrieb Stefan Beller: On Mon, Nov 16, 2015 at 10:59 AM, Jens Lehmann wrote: Am 14.11.2015 um 01:10 schrieb Stefan Beller: Thanks for pointing out that we already have some kind of server support. I wonder if we should add an additional way to make

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-16 Thread Stefan Beller
On Mon, Nov 16, 2015 at 10:59 AM, Jens Lehmann wrote: > Am 14.11.2015 um 01:10 schrieb Stefan Beller: >> >> On Fri, Nov 13, 2015 at 3:41 PM, Jeff King wrote: >>> >>> On Fri, Nov 13, 2015 at 06:38:07PM -0500, Jeff King wrote: >>> On Fri, Nov 13, 2015 at

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-16 Thread Stefan Beller
On Mon, Nov 16, 2015 at 1:42 PM, Jens Lehmann wrote: > Am 16.11.2015 um 20:25 schrieb Stefan Beller: >> >> On Mon, Nov 16, 2015 at 10:59 AM, Jens Lehmann >> wrote: >>> >>> Am 14.11.2015 um 01:10 schrieb Stefan Beller: Thanks for pointing out

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-15 Thread Lars Schneider
On 13 Nov 2015, at 00:34, Stefan Beller wrote: > On Thu, Nov 12, 2015 at 1:37 AM, wrote: >> From: Lars Schneider >> >> "git clone --recursive --depth 1 --single-branch " clones the >> submodules successfully. However,

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-15 Thread Lars Schneider
On 13 Nov 2015, at 06:35, Jeff King wrote: > On Thu, Nov 12, 2015 at 10:37:41AM +0100, larsxschnei...@gmail.com wrote: > >> From: Lars Schneider >> >> "git clone --recursive --depth 1 --single-branch " clones the >> submodules successfully. However,

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-13 Thread Stefan Beller
On Thu, Nov 12, 2015 at 9:35 PM, Jeff King wrote: > > Hrm. Do we want to make these workarounds work correctly? Or is the > final solution going to be that the first command you gave simply works, > and no workarounds are needed. If the latter, I wonder if we want to be > adding

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-13 Thread Stefan Beller
On Fri, Nov 13, 2015 at 10:41 AM, Stefan Beller wrote: > On Thu, Nov 12, 2015 at 9:35 PM, Jeff King wrote: >> >> Hrm. Do we want to make these workarounds work correctly? Or is the >> final solution going to be that the first command you gave simply works, >>

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-13 Thread Jeff King
On Fri, Nov 13, 2015 at 06:38:07PM -0500, Jeff King wrote: > On Fri, Nov 13, 2015 at 03:16:01PM -0800, Stefan Beller wrote: > > > Junio wrote on Oct 09, 2014: > > > This is so non-standard a thing to do that I doubt it is worth > > > supporting with "git clone". "git clone --branch", which is

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-13 Thread Stefan Beller
On Fri, Nov 13, 2015 at 3:41 PM, Jeff King wrote: > On Fri, Nov 13, 2015 at 06:38:07PM -0500, Jeff King wrote: > >> On Fri, Nov 13, 2015 at 03:16:01PM -0800, Stefan Beller wrote: >> >> > Junio wrote on Oct 09, 2014: >> > > This is so non-standard a thing to do that I doubt it is

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-13 Thread Jeff King
On Fri, Nov 13, 2015 at 03:16:01PM -0800, Stefan Beller wrote: > Junio wrote on Oct 09, 2014: > > This is so non-standard a thing to do that I doubt it is worth > > supporting with "git clone". "git clone --branch", which is about > "> I want to follow that particular branch", would not mesh

[PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-12 Thread larsxschneider
From: Lars Schneider "git clone --recursive --depth 1 --single-branch " clones the submodules successfully. However, it does not obey "--depth 1" for submodule cloning. The following workaround does only work if the used submodule pointer is on the default branch.

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-12 Thread Stefan Beller
On Thu, Nov 12, 2015 at 1:37 AM, wrote: > From: Lars Schneider > > "git clone --recursive --depth 1 --single-branch " clones the > submodules successfully. However, it does not obey "--depth 1" for > submodule cloning. > > The following

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-12 Thread Jeff King
On Thu, Nov 12, 2015 at 10:37:41AM +0100, larsxschnei...@gmail.com wrote: > From: Lars Schneider > > "git clone --recursive --depth 1 --single-branch " clones the > submodules successfully. However, it does not obey "--depth 1" for > submodule cloning. > > The