From f03e39cb56aad12d29c69f2ec9ded2e32c080431 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 31 May 2023 10:16:31 +0200 Subject: [PATCH] init-repository: Fix wrong remote URLs in cloned submodules The cloned submodules had a wrong origin remote URL if the origin remote of the local qt5.git repository had a trailing slash. Fix this by stripping the trailing slash when stripping the trailing ".git" from qt5.git's remote. Fixes: QTBUG-113793 Change-Id: I199b6e1915f67558ecfe69f7300d0f9ef0d4b232 Reviewed-by: Alexandru Croitor (OOO) Reviewed-by: Edward Welbourne (cherry picked from commit 6c40b6160e08887e86d4052703c513a11e0a6015) Reviewed-by: Qt Cherry-pick Bot --- init-repository | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init-repository b/init-repository index e9372155..afd8982f 100755 --- a/init-repository +++ b/init-repository @@ -669,7 +669,7 @@ sub run chomp(my $url = `git config remote.origin.url`); die("Have no origin remote.\n") if (!$url); - $url =~ s,\.git$,,; + $url =~ s,\.git/?$,,; $url =~ s/((?:tqtc-)?qt5)$//; my $qtrepo = $1 || 'qt5'; $self->{'base-url'} = $url;