aboutsummaryrefslogtreecommitdiffstats
path: root/init-repository
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-07-10 08:37:04 +0200
committerAndy Shaw <andy.shaw@qt.io>2018-07-10 15:23:41 +0000
commitc1fcf7c1ad06c440988c9456ffdd9cffdc8b7d39 (patch)
tree727677472dbb3196cfc92636e560fbd0e0923e7e /init-repository
parentc2c2a140919bc50434924ebab4ccebe89a2394b2 (diff)
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>
Diffstat (limited to 'init-repository')
-rwxr-xr-xinit-repository3
1 files changed, 2 insertions, 1 deletions
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");