Browse Source

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 5 years ago
parent
commit
3bb1c33c87
1 changed files with 2 additions and 1 deletions
  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(