summaryrefslogtreecommitdiff
path: root/lib/git/commit.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/git/commit.py')
-rw-r--r--lib/git/commit.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/git/commit.py b/lib/git/commit.py
index 2b19ea42..2bd78b75 100644
--- a/lib/git/commit.py
+++ b/lib/git/commit.py
@@ -67,6 +67,12 @@ class Commit(LazyMixin):
if tree is not None:
self.tree = Tree(repo, id=tree)
+ def __eq__(self, other):
+ return self.id == other.id
+
+ def __ne__(self, other):
+ return self.id != other.id
+
def __bake__(self):
temp = Commit.find_all(self.repo, self.id, max_count=1)[0]
self.parents = temp.parents