serafim / pagure

Forked from pagure 6 years ago
Clone

02494c5 Catch exception raised when accessing the head of the repo

Authored and Committed by pingou 6 years ago
    Catch exception raised when accessing the head of the repo
    
    When trying to diff a branch against master when master does not exist
    but the repo is not empty, pygit2 may raise an exception. Let's catch
    it and set the compare_branch to None as if the repo was empty.
    
    Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
    
        
file modified
+4 -1