git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Feb 26, 2009, 13:19 UTC
Message-ID
<20090226131946.GC7911@coredump.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.0902261216110.6258@intel-tinevez-2-302>
On Thu, Feb 26, 2009 at 12:17:36PM +0100, Johannes Schindelin wrote:
Show 21 quoted lines
> 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
Previous: Johannes SchindelinNext: Roy Lee
Message 6 of 8 in “Does cloning a shallow repo require special setting in the cloned one?”
  1. roylee17Feb 26, 2009
  2. Teemu LikonenFeb 26, 2009
  3. Roy LeeFeb 26, 2009
  4. Jeff KingFeb 26, 2009
  5. Johannes SchindelinFeb 26, 2009
  6. Jeff KingFeb 26, 2009
  7. Roy LeeFeb 26, 2009
  8. Jakub NarebskiFeb 27, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.