From c1fcf7c1ad06c440988c9456ffdd9cffdc8b7d39 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 10 Jul 2018 08:37:04 +0200 Subject: init-repo: Allow sub-module checkout path to differ from config name Change-Id: I622a8ed5daee59a96f4c6c28cc8c5e4d20b88f58 Reviewed-by: Oswald Buddenhagen Reviewed-by: Edward Welbourne --- init-repository | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init-repository b/init-repository index 875aec2b..026ac987 100755 --- a/init-repository +++ b/init-repository @@ -414,7 +414,8 @@ sub git_clone_all_submodules my $branch = $subbranches{$module}; die("No branch defined for submodule $module.\n") if (!defined($branch)); my $orig_cwd = getcwd(); - chdir($module) or confess "chdir $module: $OS_ERROR"; + my $module_dir = $subdirs{$module}; + chdir($module_dir) or confess "chdir $module_dir: $OS_ERROR"; my $br = qx(git rev-parse -q --verify $branch); if (!$br) { $self->exe('git', 'checkout', '-b', $branch, "origin/$branch"); -- cgit v1.2.3