init-repo: Allow sub-module checkout path to differ from config name

Change-Id: I622a8ed5daee59a96f4c6c28cc8c5e4d20b88f58
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Andy Shaw
2018-07-10 08:37:04 +02:00
parent c2c2a14091
commit c1fcf7c1ad

View File

@@ -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");