Re: [PATCH 1/5] submodule: implement `module_clone` as a builtin helper

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

 



On Thu, Aug 27, 2015 at 5:36 AM, Johannes Schindelin
<johannes.schindelin@xxxxxx> wrote:
> Hi Stefan,
>
> thank you so much for doing this. `git submodule` is really, really slow on Windows...
>
> On 2015-08-27 02:52, Stefan Beller wrote:
>
>> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
>> index 4b32a3c..f11fb9c 100644
>> --- a/builtin/submodule--helper.c
>> +++ b/builtin/submodule--helper.c
>> [...]
>> +
>> +/*
>> + * Clone a submodule
>> + *
>> + * $1 = submodule path
>> + * $2 = submodule name
>> + * $3 = URL to clone
>> + * $4 = reference repository to reuse (empty for independent)
>> + * $5 = depth argument for shallow clones (empty for deep)
>
> I think this description is now safely obsolete and can be deleted: you introduced explicit options like --depth to avoid the "magic" of positional parameters.

ok I'll remove that in a reroll.

>
>> +static int module_clone(int argc, const char **argv, const char *prefix)
>> +{
>> +     const char *path = NULL, *name = NULL, *url = NULL, *reference =
>> NULL, *depth = NULL;
>
> This line is a little long ;-)

fixed in reroll.

>
>> @@ -135,6 +290,9 @@ int cmd_submodule__helper(int argc, const char
>> **argv, const char *prefix)
>>       if (!strcmp(argv[1], "module_name"))
>>               return module_name(argc - 2, argv + 2, prefix);
>>
>> +     if (!strcmp(argv[1], "module_clone"))
>> +             return module_clone(argc - 1, argv + 1, prefix);
>> +
>>  usage:
>> -     usage("git submodule--helper [module_list module_name]\n");
>> +     usage("git submodule--helper [module_list module_name module_clone]\n");
>
> Was the convention not to use ( ... | ... | ... )?

git tag puts it as
    usage: git tag [-a | -s | -u <key-id>]

I looked at other --helper (git-difftool--helper which has no help to
be invoced on the command line
and git-bisect--helper which doesn't have the problem as the help is clear).

So I'll go with [brackets | separated | by | pipes | inside ] then,
just as git-tag.

>
> Thanks,
> Dscho
--
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]