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

git/repo/base.py

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy