◐ 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
2 changes: 1 addition & 1 deletion git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def config_writer(self, config_level: Lit_config_levels = "repository") -> GitCo
system = system wide configuration file
global = user level configuration file
repository = configuration file for this repository only"""
return GitConfigParser(self._get_config_path(config_level), read_only=False, repo=self)

def commit(self, rev: Union[str, Commit_ish, None] = None) -> Commit:
"""The Commit object for the specified revision
21 changes: 21 additions & 0 deletions test/test_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
SymbolicReference,
GitCommandError,
RefLog,
)
from git.objects.tag import TagObject
from test.lib import TestBase, with_rw_repo
Expand Down Expand Up @@ -172,6 +173,26 @@ def test_heads(self, rwrepo):
assert log[0].oldhexsha == pcommit.NULL_HEX_SHA
assert log[0].newhexsha == pcommit.hexsha

def test_refs(self):
types_found = set()
for ref in self.rorepo.refs:
Toggle all file notes Toggle all file annotations