git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 27, 2015, 12:36 UTC
Message-ID
<92ffde8a07de2a4d50f79ecb7350dbb3@www.dscho.org>
In-Reply-To
<1440636766-12738-2-git-send-email-sbeller@google.com>
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:
Show 14 quoted lines
> 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.
> +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 ;-)
Show 11 quoted lines
> @@ -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 ( ... | ... | ... )?

Thanks, Dscho

Previous: Stefan BellerNext: Stefan Beller
Message 3 of 11 in “Progressing with `git submodule foreach_parallel`”
  1. 0/5 Progressing with `git submodule foreach_parallel`Stefan Beller, Aug 27, 2015
  2. 1/5 submodule: implement `module_clone` as a builtin helperStefan Beller, Aug 27, 2015
  3. Johannes SchindelinAug 27, 2015
  4. Stefan BellerAug 27, 2015
  5. 2/5 thread-utils: add a threaded task queueStefan Beller, Aug 27, 2015
  6. Johannes SchindelinAug 27, 2015
  7. Stefan BellerAug 27, 2015
  8. Junio C HamanoAug 28, 2015
  9. 3/5 submodule: helper to run foreach in parallelStefan Beller, Aug 27, 2015
  10. 4/5 index-pack: Use the new worker poolStefan Beller, Aug 27, 2015
  11. 5/5 pack-objects: Use new worker poolStefan Beller, Aug 27, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.