churchyard / centos / centpkg

Forked from centos/centpkg 20 days ago
Clone

edbd72 Only add git+ssh:// for git@ repo paths

Authored and Committed by sgallagh 4 months ago
    Only add git+ssh:// for git@ repo paths
    
    Fixes an issue introduced by ad46d3458143447f3fc6174d243c9f8ff6df3454
    
    Apparently, under some circumstances, rpkg will store the "repo name" as
    only the path field when using HTTPS remotes. As a result, we were
    incorrectly treating those paths as an SSH URI since they had no scheme
    when parsed by urllib.parse.urlparse(). This resulted in the first part
    of the path being treated as the "netloc" and being trimmed out. This
    naturally meant that the lookup against Gitlab for the fork parent would
    fail.
    
    This patch adds a check to ensure that the git+ssh:// scheme is only
    added if the repo_url starts with "git@".
    
    Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
    
        
file modified
+1 -1