git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] clone: warn users --depth is ignored in local clones
Date: Tue, 24 Aug 2010 15:52:36 +1000	[thread overview]
Message-ID: <AANLkTim-XWiZKdY20P+GEtPMTeTybhpBdkrGS=CMH56e@mail.gmail.com> (raw)
In-Reply-To: <20100824052846.GE20037@burratino>

On Tue, Aug 24, 2010 at 3:28 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> 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.

I'd leave it for Junio to edit the patch if he likes it.
-- 
Duy

      reply	other threads:[~2010-08-24  5:52 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 ` [PATCH v2 1/3] clone: warn users --depth is ignored in local clones Jonathan Nieder
2010-08-24  5:52   ` Nguyen Thai Ngoc Duy [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTim-XWiZKdY20P+GEtPMTeTybhpBdkrGS=CMH56e@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).