Merge branch 'sb/submodule-init'
authorJunio C Hamano <gitster@pobox.com>
Tue, 17 May 2016 21:38:16 +0000 (14:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 May 2016 21:38:17 +0000 (14:38 -0700)
Update of "git submodule" to move pieces of logic to C continues.

* sb/submodule-init:
  submodule init: redirect stdout to stderr
  submodule--helper update-clone: abort gracefully on missing .gitmodules
  submodule init: fail gracefully with a missing .gitmodules file
  submodule: port init from shell to C
  submodule: port resolve_relative_url from shell to C

1  2 
builtin/submodule--helper.c
git-submodule.sh
t/t7400-submodule-basic.sh

@@@ -570,8 -840,10 +906,11 @@@ static struct cmd_struct commands[] = 
        {"list", module_list},
        {"name", module_name},
        {"clone", module_clone},
-       {"update-clone", update_clone}
 +      {"sanitize-config", module_sanitize_config},
+       {"update-clone", update_clone},
+       {"resolve-relative-url", resolve_relative_url},
+       {"resolve-relative-url-test", resolve_relative_url_test},
+       {"init", module_init}
  };
  
  int cmd_submodule__helper(int argc, const char **argv, const char *prefix)
@@@ -823,8 -697,9 +707,9 @@@ cmd_update(
                if test -n "$recursive"
                then
                        (
-                               prefix="$prefix$sm_path/"
+                               prefix=$(relative_path "$prefix$sm_path/")
+                               wt_prefix=
 -                              clear_local_git_env
 +                              sanitize_submodule_env
                                cd "$sm_path" &&
                                eval cmd_update
                        )
Simple merge