瀏覽代碼

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 年之前
父節點
當前提交
3bb1c33c87
共有 1 個文件被更改,包括 2 次插入1 次删除
  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(