From: Nguyen Thai Ngoc Duy Date: Sun, 22 Aug 2010 22:43:31 GMT Subject: Re: [PATCH 1/3] clone: do not accept --depth on local clones Message-ID: In-Reply-To: <7vwrrk95eg.fsf@alter.siamese.dyndns.org> On Sat, Aug 21, 2010 at 10:27 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> clone_local() function disregards --depth. Make it more apparent. >> Also hint users that file:// works with --depth. > > Hmm---why? > > The "--depth" option is an ugly hack that tries to conserve network > bandwidth and disk usage, which is not necessary if you are doing a local > hardlinking clone.  Without this patch we allowed people to clone with the > option without a downside (allowing it didn't result in broken repository, > for example), but with it, what has long been allowed suddenly stops > working.  Is the breakage justifiable? I also expect it to cut down history too. Maybe it's just me, when I say --depth=3, 'git log' should give me more or less 3 commits regardless what kind of transport I use to clone. Or we could make it a warning, "--depth is ignored in local clone"? -- Duy