summaryrefslogtreecommitdiff
path: root/lib/git/util.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-11-17 22:38:10 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-11-17 22:38:10 +0100
commit1687283c13caf7ff8d1959591541dff6a171ca1e (patch)
tree393362379df7c27f1f905c94148789063b2fdd5a /lib/git/util.py
parent7cc4d748a132377ffe63534e9777d7541a3253c5 (diff)
downloadgitpython-1687283c13caf7ff8d1959591541dff6a171ca1e.tar.gz
RootModule.update: initial implementation of update method, which should be able to handle submodule removals, additions, path changes and branch changes. All this still needs to be tested though
Diffstat (limited to 'lib/git/util.py')
-rw-r--r--lib/git/util.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/git/util.py b/lib/git/util.py
index b77e7904..b7446953 100644
--- a/lib/git/util.py
+++ b/lib/git/util.py
@@ -316,6 +316,14 @@ class IterableList(list):
return getattr(self, index)
except AttributeError:
raise IndexError( "No item found with id %r" % (self._prefix + index) )
+
+ def __contains__(self, item):
+ try:
+ self[item]
+ return True
+ except IndexError:
+ return False
+ # END handle exception
class Iterable(object):