]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5510-fetch.sh
Sync with 2.36.3
[thirdparty/git.git] / t / t5510-fetch.sh
index dea51d4a535f381aae95fbc02f93cc2e432e85d0..c0b745e33b8a52b6c2defda1fa04ef1b8c202841 100755 (executable)
@@ -854,7 +854,11 @@ test_configured_prune_type () {
                then
                        new_cmdline=$cmdline_setup
                else
-                       new_cmdline=$(printf "%s" "$cmdline" | perl -pe 's[origin(?!/)]["'"$remote_url"'"]g')
+                       new_cmdline=$(perl -e '
+                               my ($cmdline, $url) = @ARGV;
+                               $cmdline =~ s[origin(?!/)][quotemeta($url)]ge;
+                               print $cmdline;
+                       ' -- "$cmdline" "$remote_url")
                fi
 
                if test "$fetch_prune_tags" = 'true' ||