Re: Does cloning a shallow repo require special setting in the cloned one?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 26, 2009 at 12:17:36PM +0100, Johannes Schindelin wrote:

> I think it is way better to warn, since "--depth" is usually passed out of 
> concerns about disk space.  And --shared should shut that concern up 
> rather nicely.
> 
> diff --git a/builtin-clone.c b/builtin-clone.c
> index c338910..5831034 100644
> --- a/builtin-clone.c
> +++ b/builtin-clone.c
> @@ -511,8 +511,11 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
>  	refspec.src = src_ref_prefix;
>  	refspec.dst = branch_top.buf;
>  
> -	if (path && !is_bundle)
> +	if (path && !is_bundle) {
> +		if (option_depth)
> +			warning("Ignoring --depth for local clone");
>  		refs = clone_local(path, git_dir);
> +	}
>  	else {
>  		struct remote *remote = remote_get(argv[0]);
>  		transport = transport_get(remote, remote->url[0]);

That seems reasonable to me.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux