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

[PATCHv15 0/5] Expose submodule parallelism to the user

From
Stefan Beller <sbeller@google.com>
Date
Feb 24, 2016, 03:20 UTC
Message-ID
<1456284017-26141-1-git-send-email-sbeller@google.com>

This build on top of 163b9b1f919c762a4bfb693b3aa05ef1aa627fee (origin/sb/submodule-parallel-update~3) and replaces the commits origin/sb/submodule-parallel-update~2..

* Renamed inspect_clone_next_submodule to prepare_to_clone_next_submodule
  and reordered the arguments thereof
* Comments for the struct submodule_update_clone which is passed around
* Better handling around LFs.
* Renamed struct child_process *cp to *child
* Print #unmatched in git-submodule.sh instead of the helper
Show 6 quoted lines
> 
> 	if (pp->update.type == SM_UPDATE_NONE
> 	    || (pp->update.type == SM_UPDATE_UNSPECIFIED
> 	        && sub->update_strategy.type == SM_UPDATE_NONE)) {
> 
> What does pp stand for?

I think I took it as parallel_process when starting off from the parallel processing machinery. I'll rename it (probably to suc as short for struct submodule_update_clone).

Show 5 quoted lines
> > +	if (pp->recursive_prefix)
> > +		displaypath = relative_path(pp->recursive_prefix,
> > +					    ce->name, &displaypath_sb);
> 
> Nit: could use braces.

Why? I would understand a few lines above where we have an if nested in an if with braces. But here we have a pretty straighforward one statement per case condition.

Show 7 quoted lines
> > +	sub = submodule_from_path(null_sha1, ce->name);
> 
> It's common to call submodule_from_path with null_sha1 as a parameter
> but I have trouble continuing to remember what that means.  Maybe
> there should be a separate function that handles that?  As a
> side-effect, the name and docstring of that function could explain
> what it means, which I still am not sure about. :)

I'll do that as a followup cleanup patch as it affects more than just the new code.

>> +		OPT_STRING(0, "reference", &pp.reference, "<repository>",
>> +			   N_("Use the local reference repository "
>> +			      "instead of a full clone")),
> Is this allowed to be relative?  If so, what is it relative to?

It is passing on the argument to clone, so I assume the same rules apply as for git-clone.

Thanks, Stefan

Stefan Beller (5):
  run-command: expose default_{start_failure, task_finished}
  run_processes_parallel: add LF when caller is sloppy
  git submodule update: have a dedicated helper for cloning
  submodule update: expose parallelism to the user
  clone: allow an explicit argument for parallel submodule clones
 Documentation/git-clone.txt     |   6 +-
 Documentation/git-submodule.txt |   7 +-
 builtin/clone.c                 |  19 ++-
 builtin/submodule--helper.c     | 255 +++++++++++++++++++++++++++++++++++++++-
 git-submodule.sh                |  56 ++++-----
 run-command.c                   |  35 ++++--
 run-command.h                   |  19 +++
 t/t0061-run-command.sh          |  26 ++++
 t/t7406-submodule-update.sh     |  27 +++++
 test-run-command.c              |  18 +++
 10 files changed, 412 insertions(+), 56 deletions(-)
-- 
2.7.0.rc0.34.ga06e0b3.dirty
Next: Stefan Beller
Message 1 of 13 in “[PATCHv15 0/5] Expose submodule parallelism to the user”
  1. Stefan BellerFeb 24, 2016
  2. 1/5 run-command: expose default_{start_failure, task_finished}Stefan Beller, Feb 24, 2016
  3. 2/5 run_processes_parallel: add LF when caller is sloppyStefan Beller, Feb 24, 2016
  4. Junio C HamanoFeb 24, 2016
  5. Stefan BellerFeb 24, 2016
  6. Junio C HamanoFeb 24, 2016
  7. Jonathan NiederFeb 24, 2016
  8. Stefan BellerFeb 24, 2016
  9. Jonathan NiederFeb 25, 2016
  10. Junio C HamanoFeb 25, 2016
  11. 3/5 git submodule update: have a dedicated helper for cloningStefan Beller, Feb 24, 2016
  12. 4/5 submodule update: expose parallelism to the userStefan Beller, Feb 24, 2016
  13. 5/5 clone: allow an explicit argument for parallel submodule clonesStefan Beller, Feb 24, 2016

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.