From: Jonathan Nieder <jrnieder@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH v2 1/3] clone: warn users --depth is ignored in local clones
Date: Tue, 24 Aug 2010 00:28:46 -0500 [thread overview]
Message-ID: <20100824052846.GE20037@burratino> (raw)
In-Reply-To: <1282565304-3122-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy wrote:
> +++ b/builtin/clone.c
> @@ -361,7 +361,7 @@ static void write_remote_refs(const struct ref *local_refs)
>
> int cmd_clone(int argc, const char **argv, const char *prefix)
> {
> - int is_bundle = 0;
> + int is_bundle = 0, is_local;
> struct stat buf;
> const char *repo_name, *repo, *work_tree, *git_dir;
> char *path, *dir;
> @@ -414,6 +414,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
> repo = xstrdup(make_absolute_path(repo_name));
> else
> repo = repo_name;
> + is_local = path && !is_bundle;
> + if (is_local && option_depth)
> + warning("--depth is ignored in local clones, use file:// instead.");
Micronit: this comma should be a semicolon or period.
As for the patch itself: I like it. I could have used this advice
about a year ago.
next prev parent reply other threads:[~2010-08-24 5:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-23 12:08 [PATCH v2 1/3] clone: warn users --depth is ignored in local clones Nguyễn Thái Ngọc Duy
2010-08-23 12:08 ` [PATCH v2 2/3] fetch-pack: use args.shallow to detect shallow clone instead of args.depth Nguyễn Thái Ngọc Duy
2010-08-24 16:31 ` Junio C Hamano
2010-08-24 22:14 ` Nguyen Thai Ngoc Duy
2010-08-23 12:08 ` [PATCH v2 3/3] {fetch,upload}-pack: allow --depth=0 for infinite depth Nguyễn Thái Ngọc Duy
2010-08-24 13:53 ` Jeff King
2010-08-24 17:39 ` Junio C Hamano
2010-08-24 17:46 ` Jeff King
2010-08-24 22:12 ` Nguyen Thai Ngoc Duy
2010-08-24 5:28 ` Jonathan Nieder [this message]
2010-08-24 5:52 ` [PATCH v2 1/3] clone: warn users --depth is ignored in local clones Nguyen Thai Ngoc Duy
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=20100824052846.GE20037@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.