summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-05-15 22:53:20 +0100
committerYobmod <yobmod@gmail.com>2021-05-15 22:53:20 +0100
commit96364599258e7e036298dd5737918bde346ec195 (patch)
tree3cc7d316cb4cb052b0b40ee1f68e2d443814348b /git/repo/base.py
parent33346b25c3a4fb5ea37202d88d6a6c66379099c5 (diff)
downloadgitpython-96364599258e7e036298dd5737918bde346ec195.tar.gz
Add initial types to IndexFile .init() to _to_relative_path()
Diffstat (limited to 'git/repo/base.py')
-rw-r--r--git/repo/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index ce5f6bd0..607eb868 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -80,8 +80,8 @@ class Repo(object):
git = cast('Git', None) # Must exist, or __del__ will fail in case we raise on `__init__()`
working_dir = None # type: Optional[PathLike]
_working_tree_dir = None # type: Optional[PathLike]
- git_dir = None # type: Optional[PathLike]
- _common_dir = None # type: Optional[PathLike]
+ git_dir = "" # type: PathLike
+ _common_dir = "" # type: PathLike
# precompiled regex
re_whitespace = re.compile(r'\s+')
@@ -208,7 +208,7 @@ class Repo(object):
common_dir = open(osp.join(self.git_dir, 'commondir'), 'rt').readlines()[0].strip()
self._common_dir = osp.join(self.git_dir, common_dir)
except OSError:
- self._common_dir = None
+ self._common_dir = ""
# adjust the wd in case we are actually bare - we didn't know that
# in the first place