Re: [PATCH v2 1/3] clone: warn users --depth is ignored in local clones

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

 



On Tue, Aug 24, 2010 at 3:28 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> 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
--
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]