summaryrefslogtreecommitdiff
path: root/git/index/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/index/base.py')
-rw-r--r--git/index/base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/git/index/base.py b/git/index/base.py
index e2b3f8fa..debd710f 100644
--- a/git/index/base.py
+++ b/git/index/base.py
@@ -3,7 +3,7 @@
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
-from git.refs.reference import Reference
+
import glob
from io import BytesIO
import os
@@ -74,6 +74,7 @@ from git.types import PathLike, TBD
if TYPE_CHECKING:
from subprocess import Popen
from git.repo import Repo
+ from git.refs.reference import Reference
StageType = int
@@ -1191,7 +1192,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
assert "Should not reach this point"
@default_index
- def reset(self, commit: Union[Commit, Reference, str] = 'HEAD', working_tree: bool = False,
+ def reset(self, commit: Union[Commit, 'Reference', str] = 'HEAD', working_tree: bool = False,
paths: Union[None, Iterable[PathLike]] = None,
head: bool = False, **kwargs: Any) -> 'IndexFile':
"""Reset the index to reflect the tree at the given commit. This will not