Skip to content

Commit f2e35e7

Browse files
committed
fix: both blame methods accept None as a revision
1 parent afa5754 commit f2e35e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: git/repo/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ def active_branch(self) -> Head:
957957
# reveal_type(self.head.reference) # => Reference
958958
return self.head.reference
959959

960-
def blame_incremental(self, rev: str | HEAD, file: str, **kwargs: Any) -> Iterator["BlameEntry"]:
960+
def blame_incremental(self, rev: str | HEAD | None, file: str, **kwargs: Any) -> Iterator["BlameEntry"]:
961961
"""Iterator for blame information for the given file at the given revision.
962962
963963
Unlike :meth:`blame`, this does not return the actual file's contents, only a
@@ -1045,7 +1045,7 @@ def blame_incremental(self, rev: str | HEAD, file: str, **kwargs: Any) -> Iterat
10451045

10461046
def blame(
10471047
self,
1048-
rev: Union[str, HEAD],
1048+
rev: Union[str, HEAD, None],
10491049
file: str,
10501050
incremental: bool = False,
10511051
rev_opts: Optional[List[str]] = None,

0 commit comments

Comments
 (0)