Skip to content
  • Lukas Fleischer's avatar
    git-update: Improve error message for non-blob objects · ed72af63
    Lukas Fleischer authored
    
    
    When a repository contains a directory, a user is currently faced with
    the following error message:
    
        remote: Traceback (most recent call last):
        remote:   File "hooks/update", line 194, in <module>
        remote:     if repo[treeobj.id].size > 250000:
        remote: AttributeError: '_pygit2.Tree' object has no attribute 'size'
        remote: error: hook declined to update refs/heads/master
    
    Explicitly check for directories and other non-blob objects and display
    a more intuitive message.
    
    Signed-off-by: default avatarLukas Fleischer <lfleischer@archlinux.org>
    ed72af63