1894300 Rely on the list of branches rather than the ``.empty`` attribute

Authored and Committed by pingou 4 years ago
    Rely on the list of branches rather than the ``.empty`` attribute
    
    There is a risk sometime that the git repo is no longer empty (because
    we added a specific head for a PR for example) so ``.empty`` returns
    False while there is actually no content in the git repo.
    
    In this case, there will be no branches in that git repo.
    
    So use this mechanism to determine if the git repo is empty or not.
    
    Fixes https://pagure.io/pagure/issue/3090
    
    Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
    
        
file modified
+2 -1