• Y
    Use File.exist? to check if a repository exists · 6f393877
    Yorick Peterse 提交于
    Initializing Rugged objects is way too expensive just to check if a
    repository exists. Even though we cache this data once in a while we
    have to refresh this. On GitLab.com we have seen Repository#exists?
    taking up to _1 minute_ to complete in the absolute worst case, though
    usually it sits around a second or so.
    
    Using File.exist? to instead check if $GIT_DIR/refs exists is a much
    faster way of checking if a repository was initialized properly.
    6f393877
repository_spec.rb 49.9 KB