diff --git a/pygit2/index.py b/pygit2/index.py index 5213c22..1a04cbf 100644 --- a/pygit2/index.py +++ b/pygit2/index.py @@ -321,7 +321,7 @@ class Index(object): class IndexEntry(object): - __slots__ = ['id', 'path', 'mode', '_index'] + __slots__ = ['id', 'path', 'mode'] def __init__(self, path, object_id, mode): self.path = path @@ -331,6 +331,11 @@ class IndexEntry(object): self.mode = mode """The mode of this entry, a GIT_FILEMODE_ value""" + @property + def oid(self): + # For backwards compatibility + return self.id + @property def hex(self): """The id of the referenced object as a hex string"""