Ver Fonte

git: Skip "git cat-file" check if filename is "."

Apparently, "git cat-file -e somebranch:." returns an error. Since the
local directory (".") always exists anyway, we can just skip the file_exists
check in that case.
Jan Holthuis há 5 anos atrás
pai
commit
3bb1c33c87
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      sphinx_multiversion/git.py

+ 2 - 1
sphinx_multiversion/git.py

@@ -104,7 +104,8 @@ def get_refs(
         missing_files = [
             filename
             for filename in files
-            if not file_exists(gitroot, ref.refname, filename)
+            if filename != "."
+            and not file_exists(gitroot, ref.refname, filename)
         ]
         if missing_files:
             logger.debug(