summaryrefslogtreecommitdiff
path: root/git/index/typ.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-05-16 18:04:30 +0100
committerYobmod <yobmod@gmail.com>2021-05-16 18:04:30 +0100
commit78d12aa7c922551dddd7168498e29eae32c9d109 (patch)
treeee45d8792ee808a4316cfac5133397a7becf8334 /git/index/typ.py
parentc3f91bd1c0e8aef1b416ae6b1f55e7bd93a4f281 (diff)
downloadgitpython-78d12aa7c922551dddd7168498e29eae32c9d109.tar.gz
Add remaining types to IndexFile ._preprocess_add_items() to .diff()
Diffstat (limited to 'git/index/typ.py')
-rw-r--r--git/index/typ.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/git/index/typ.py b/git/index/typ.py
index 2a7dd799..4d307777 100644
--- a/git/index/typ.py
+++ b/git/index/typ.py
@@ -8,6 +8,8 @@ from .util import (
)
from git.objects import Blob
+from git.types import PathLike
+
__all__ = ('BlobFilter', 'BaseIndexEntry', 'IndexEntry')
@@ -79,7 +81,7 @@ class BaseIndexEntry(tuple):
return b2a_hex(self[1]).decode('ascii')
@property
- def stage(self):
+ def stage(self) -> int:
"""Stage of the entry, either:
* 0 = default stage
@@ -92,7 +94,7 @@ class BaseIndexEntry(tuple):
return (self[2] & CE_STAGEMASK) >> CE_STAGESHIFT
@property
- def path(self):
+ def path(self) -> PathLike:
""":return: our path relative to the repository working tree root"""
return self[3]