From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Teemu Likonen <tlikonen@iki.fi>, roylee17 <roylee17@gmail.com>,
git@vger.kernel.org
Subject: Re: Does cloning a shallow repo require special setting in the cloned one?
Date: Thu, 26 Feb 2009 08:19:46 -0500 [thread overview]
Message-ID: <20090226131946.GC7911@coredump.intra.peff.net> (raw)
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:
> 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
next prev parent reply other threads:[~2009-02-26 13:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-26 3:49 Does cloning a shallow repo require special setting in the cloned one? roylee17
2009-02-26 6:34 ` Teemu Likonen
2009-02-26 7:33 ` Roy Lee
2009-02-26 10:46 ` Jeff King
2009-02-26 11:17 ` Johannes Schindelin
2009-02-26 13:19 ` Jeff King [this message]
2009-02-26 13:01 ` Roy Lee
2009-02-27 0:42 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090226131946.GC7911@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=roylee17@gmail.com \
--cc=tlikonen@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).