summaryrefslogtreecommitdiff
path: root/lib/git/objects/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/git/objects/base.py')
-rw-r--r--lib/git/objects/base.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/git/objects/base.py b/lib/git/objects/base.py
index 82c2589c..b8cec47f 100644
--- a/lib/git/objects/base.py
+++ b/lib/git/objects/base.py
@@ -114,7 +114,10 @@ class Object(LazyMixin):
class IndexObject(Object):
"""Base for all objects that can be part of the index file , namely Tree, Blob and
SubModule objects"""
- __slots__ = ("path", "mode")
+ __slots__ = ("path", "mode")
+
+ # for compatability with iterable lists
+ _id_attribute_ = 'path'
def __init__(self, repo, binsha, mode=None, path=None):
"""Initialize a newly instanced IndexObject