Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

repo.blame andrepo.blame_incremental now acceptNone as therev parameter.#1846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 3 commits intogitpython-developers:mainfromGaubbe:main
Feb 26, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletionsgit/repo/base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -957,13 +957,15 @@ def active_branch(self) -> Head:
# reveal_type(self.head.reference) # => Reference
return self.head.reference

def blame_incremental(self, rev: str | HEAD, file: str, **kwargs: Any) -> Iterator["BlameEntry"]:
def blame_incremental(self, rev: str | HEAD | None, file: str, **kwargs: Any) -> Iterator["BlameEntry"]:
"""Iterator for blame information for the given file at the given revision.

Unlike :meth:`blame`, this does not return the actual file's contents, only a
stream of :class:`BlameEntry` tuples.

:param rev: Revision specifier, see git-rev-parse for viable options.
:param rev: Revision specifier. If `None`, the blame will include all the latest
uncommitted changes. Otherwise, anything succesfully parsed by git-rev-parse
is a valid option.

:return: Lazy iterator of :class:`BlameEntry` tuples, where the commit indicates
the commit to blame for the line, and range indicates a span of line numbers
Expand DownExpand Up@@ -1045,15 +1047,17 @@ def blame_incremental(self, rev: str | HEAD, file: str, **kwargs: Any) -> Iterat

def blame(
self,
rev: Union[str, HEAD],
rev: Union[str, HEAD, None],
file: str,
incremental: bool = False,
rev_opts: Optional[List[str]] = None,
**kwargs: Any,
) -> List[List[Commit | List[str | bytes] | None]] | Iterator[BlameEntry] | None:
"""The blame information for the given file at the given revision.

:param rev: Revision specifier, see git-rev-parse for viable options.
:param rev: Revision specifier. If `None`, the blame will include all the latest
uncommitted changes. Otherwise, anything succesfully parsed by git-rev-parse
is a valid option.

:return:
list: [git.Commit, list: [<line>]]
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp