|
41 | 41 | overload,
|
42 | 42 | )
|
43 | 43 |
|
44 |
| -from git.types import PathLike, Literal, Old_commit_ish |
| 44 | +from git.types import AnyGitObject, Literal, PathLike |
45 | 45 |
|
46 | 46 | if TYPE_CHECKING:
|
47 | 47 | from git.objects.commit import Commit
|
@@ -194,7 +194,7 @@ def __init__(
|
194 | 194 | self.summary = summary
|
195 | 195 |
|
196 | 196 | @property
|
197 |
| - def old_commit(self) -> Union[str, SymbolicReference, Old_commit_ish, None]: |
| 197 | + def old_commit(self) -> Union["Commit", None]: |
198 | 198 | return self._old_commit_sha and self._remote.repo.commit(self._old_commit_sha) or None
|
199 | 199 |
|
200 | 200 | @property
|
@@ -360,7 +360,7 @@ def __init__(
|
360 | 360 | ref: SymbolicReference,
|
361 | 361 | flags: int,
|
362 | 362 | note: str = "",
|
363 |
| - old_commit: Union[Old_commit_ish, None] = None, |
| 363 | + old_commit: Union[AnyGitObject, None] = None, |
364 | 364 | remote_ref_path: Optional[PathLike] = None,
|
365 | 365 | ) -> None:
|
366 | 366 | """Initialize a new instance."""
|
@@ -436,7 +436,7 @@ def _from_line(cls, repo: "Repo", line: str, fetch_line: str) -> "FetchInfo":
|
436 | 436 |
|
437 | 437 | # Parse operation string for more info.
|
438 | 438 | # This makes no sense for symbolic refs, but we parse it anyway.
|
439 |
| - old_commit: Union[Old_commit_ish, None] = None |
| 439 | + old_commit: Union[AnyGitObject, None] = None |
440 | 440 | is_tag_operation = False
|
441 | 441 | if "rejected" in operation:
|
442 | 442 | flags |= cls.REJECTED
|
|
0 commit comments