$git_url !~
m{^(?:(?:https?|git|ssh):[^:]|(?:[-_.a-z0-9]+@)?[-_.a-z0-9]+:(?:[^:]|$))}) {
Uppercase letter should be allowed in usernames and domains, I guess?
This regexp matches "foo://bar"; but this URL would make git execute
remote helper "foo", which might be unsafe. I suggest replacing
(?:[^:]|$)
with
(?!:|//)
qw(git clone -c protocol.file.allow=user --)
qw(git -c protocol.file.allow=user clone --) would be better here.
The difference is that the former unnecessarily puts
protocol.file.allow=user in the repo's .git/config.
--
Jakub Wilk