Get back IndexEntry.oid for backwards compatibility

This commit is contained in:
J. David Ibáñez
2014-07-30 12:58:27 +02:00
parent 3ccba38725
commit ed26ed3944

View File

@@ -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"""