소스 검색

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(