Merge branch 'sb/submodule-clone-rr'
authorJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2016 04:49:50 +0000 (21:49 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2016 04:49:50 +0000 (21:49 -0700)
"git clone --resurse-submodules --reference $path $URL" is a way to
reduce network transfer cost by borrowing objects in an existing
$path repository when cloning the superproject from $URL; it
learned to also peek into $path for presense of corresponding
repositories of submodules and borrow objects from there when able.

* sb/submodule-clone-rr:
clone: recursive and reference option triggers submodule alternates
clone: implement optional references
clone: clarify option_reference as required
clone: factor out checking for an alternate path
submodule--helper update-clone: allow multiple references
submodule--helper module-clone: allow multiple references
t7408: merge short tests, factor out testing method
t7408: modernize style

1  2 
Documentation/config.txt
builtin/submodule--helper.c
cache.h
git-submodule.sh
sha1_file.c
Simple merge
index e79790f0bdc9f19cb9d9773d1a9bdb10044bbb8d,a3667578b4a7554d8b3377ce8e9d1e72bb4d6b1c..9d79f1994a43efed3883ccb80898292a687c4d76
@@@ -442,9 -442,10 +442,9 @@@ static int module_name(int argc, const 
  }
  
  static int clone_submodule(const char *path, const char *gitdir, const char *url,
-                          const char *depth, const char *reference, int quiet)
+                          const char *depth, struct string_list *reference, int quiet)
  {
 -      struct child_process cp;
 -      child_process_init(&cp);
 +      struct child_process cp = CHILD_PROCESS_INIT;
  
        argv_array_push(&cp.args, "clone");
        argv_array_push(&cp.args, "--no-checkout");
diff --cc cache.h
Simple merge
Simple merge
diff --cc sha1_file.c
Simple merge