◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
12 changes: 10 additions & 2 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,11 +1042,19 @@ def active_branch(self) -> Head:
:raise TypeError:
If HEAD is detached.

:return:
:class:`~git.refs.head.Head` to the active branch
"""
# reveal_type(self.head.reference) # => Reference
return self.head.reference

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.
Expand Down
40 changes: 40 additions & 0 deletions test/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,46 @@ def test_empty_repo(self, rw_dir):

assert "BAD MESSAGE" not in contents, "log is corrupt"

def test_merge_base(self):
repo = self.rorepo
c1 = "f6aa8d1"
Loading
Toggle all file notes Toggle all file annotations