Skip to content

Commit

Permalink
Fix Commit.references.
Browse files Browse the repository at this point in the history
  • Loading branch information
elibon99 committed Dec 4, 2023
1 parent 41efea8 commit 34de0cb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions gitbark/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,7 @@ def _get_info(self) -> str:
@property
def references(self) -> list[str]:
"""The list of refs pointing to the commit."""
info = self._get_info()
info = info[info.index("(") + 1 : info.index(")")]
parts = info.split(", ")
refs = parts[1:]
if parts[0].startswith("HEAD -> "):
refs.insert(0, parts[0].split()[-1])
return refs
return [ref for ref, c in self.repo.references.items() if c == self]

@property
def signature(self) -> tuple[bytes, bytes]:
Expand Down

0 comments on commit 34de0cb

Please sign in to comment.