1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 02:16:12 +01:00

Merge branch 'fix_git_detectoin' of https://github.com/adrianschroeter/osc

Fix heuristic to detect a git url. It does not have to necessarily end
with ".git" and can start with git:// or git@.
This commit is contained in:
Marcus Huewe 2020-05-05 12:22:34 +02:00
commit 1d056c01ea

View File

@ -4668,11 +4668,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
# Do some magic here, when adding a url. We want that the server to download the tar ball and to verify it
for arg in parseargs(args):
if arg.startswith('http://') or arg.startswith('https://') or arg.startswith('ftp://') or arg.startswith('git://'):
if arg.endswith('.git'):
addGitSource(arg)
else:
addDownloadUrlService(arg)
if arg.endswith('.git') or arg.startswith('git://') or arg.startswith('git@'):
addGitSource(arg)
elif arg.startswith('http://') or arg.startswith('https://') or arg.startswith('ftp://'):
addDownloadUrlService(arg)
else:
addFiles([arg])