◐ 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: 2 additions & 0 deletions git/refs/symbolic.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ def _get_ref_info_helper(
"""Return: (str(sha), str(target_ref_path)) if available, the sha the file at
rela_path points to, or None. target_ref_path is the reference we
point to, or None"""
tokens: Union[None, List[str], Tuple[str, str]] = None
repodir = _git_dir(repo, ref_path)
try:
Expand Down
15 changes: 15 additions & 0 deletions test/test_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# the BSD License: http://www.opensource.org/licenses/bsd-license.php

from itertools import chain

from git import (
Reference,
Expand All @@ -20,9 +21,11 @@
from git.objects.tag import TagObject
from test.lib import TestBase, with_rw_repo
from git.util import Actor

import git.refs as refs
import os.path as osp


class TestRefs(TestBase):
Expand Down Expand Up @@ -616,3 +619,15 @@ def test_dereference_recursive(self):

def test_reflog(self):
assert isinstance(self.rorepo.heads.master.log(), RefLog)
Toggle all file notes Toggle all file annotations