pygit2
pygit2 copied to clipboard
Repository.notes KeyError when empty
repo = pygit2.Repository("xxx-repo")
try:
repo.notes()
except KeyError as e:
print(e)
get:
"reference 'refs/notes/commits' not found"
when refs/notes or other note-name not fount, it means note is empty and should return None
pygit2: 1.15.0