768543a Check if fork exists before cloning

Authored and Committed by lsedlar 6 years ago
    Check if fork exists before cloning
    
    Current heuristic for determining forks is checking if there is a slash
    in the repo name. That however does not work in the face of namespaces.
    
    This patch adds an option to `repo_url` function to force the code to
    treat the name as is and not as a fork. The caller will have to decide
    what to do.
    
    In clone command we can query Pagure API to figure out if we are cloning
    a fork or repo in namespace. This incurs a small slowdown, but makes it
    work for both cases.
    
    Fixes: https://pagure.io/pag/issue/27
    
        
file modified
+16 -1
file modified
+10 -4
file added
+102