summaryrefslogtreecommitdiff
path: root/lib/git/commit.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-07 21:08:09 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-07 21:08:09 +0200
commit75c161cbc017a7d176dd0d7b937db26b3ce637a1 (patch)
tree4ee155db8b0bd0e5fb2ed56a167b0505e493ae7a /lib/git/commit.py
parent53ed0d43ab950d4deeefd238c7685dabef943800 (diff)
parent3410fdc42075bd788a78f4b2a68c5e2cc0930409 (diff)
downloadgitpython-75c161cbc017a7d176dd0d7b937db26b3ce637a1.tar.gz
Merge commit 'JonNordby/master' into integration
* commit 'JonNordby/master': implemented equality operations on Commit objects
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 a488c4a1..ba7a7102 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