git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	Jeff King <peff@peff.net>, Jonathan Nieder <jrnieder@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/5] submodule: implement `module_clone` as a builtin helper
Date: Thu, 27 Aug 2015 14:57:45 -0700	[thread overview]
Message-ID: <CAGZ79kaDT5P_LgELhCA+TWc+caCFpZDcQYsDcjW0vVquXfj3HQ@mail.gmail.com> (raw)
In-Reply-To: <92ffde8a07de2a4d50f79ecb7350dbb3@www.dscho.org>

On Thu, Aug 27, 2015 at 5:36 AM, Johannes Schindelin
<johannes.schindelin@gmx.de> 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

  reply	other threads:[~2015-08-27 21:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27  0:52 [RFC PATCH 0/5] Progressing with `git submodule foreach_parallel` Stefan Beller
2015-08-27  0:52 ` [PATCH 1/5] submodule: implement `module_clone` as a builtin helper Stefan Beller
2015-08-27 12:36   ` Johannes Schindelin
2015-08-27 21:57     ` Stefan Beller [this message]
2015-08-27  0:52 ` [PATCH 2/5] thread-utils: add a threaded task queue Stefan Beller
2015-08-27 12:59   ` Johannes Schindelin
2015-08-27 17:02     ` Stefan Beller
2015-08-28 15:34     ` Junio C Hamano
2015-08-27  0:52 ` [PATCH 3/5] submodule: helper to run foreach in parallel Stefan Beller
2015-08-27  0:52 ` [PATCH 4/5] index-pack: Use the new worker pool Stefan Beller
2015-08-27  0:52 ` [PATCH 5/5] pack-objects: Use " Stefan Beller

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=CAGZ79kaDT5P_LgELhCA+TWc+caCFpZDcQYsDcjW0vVquXfj3HQ@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    /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).