diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-13 21:26:19 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-13 21:26:19 +0200 |
commit | 6acec357c7609fdd2cb0f5fdb1d2756726c7fe98 (patch) | |
tree | c7cb258ba85691082b7f7e95fa7f187e1f37405a /lib/git/refs.py | |
parent | f4fa1cb3c3e84cad8b74edb28531d2e27508be26 (diff) | |
download | gitpython-6acec357c7609fdd2cb0f5fdb1d2756726c7fe98.tar.gz |
renamed find_all to list_all, changed commit to use iterable interface in preparation for command changes
Diffstat (limited to 'lib/git/refs.py')
-rw-r--r-- | lib/git/refs.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/git/refs.py b/lib/git/refs.py index bdfff6f4..32bc7784 100644 --- a/lib/git/refs.py +++ b/lib/git/refs.py @@ -73,7 +73,7 @@ class Ref(LazyMixin): return '/'.join(tokens[2:]) @classmethod - def find_all(cls, repo, common_path = "refs", **kwargs): + def list_items(cls, repo, common_path = "refs", **kwargs): """ Find all refs in the repository @@ -158,14 +158,14 @@ class Head(Ref): return self.object @classmethod - def find_all(cls, repo, common_path = "refs/heads", **kwargs): + def list_items(cls, repo, common_path = "refs/heads", **kwargs): """ Returns git.Head[] - For more documentation, please refer to git.base.Ref.find_all + For more documentation, please refer to git.base.Ref.list_items """ - return super(Head,cls).find_all(repo, common_path, **kwargs) + return super(Head,cls).list_items(repo, common_path, **kwargs) def __repr__(self): return '<git.Head "%s">' % self.name @@ -181,7 +181,7 @@ class TagRef(Ref): This tag object will always point to a commit object, but may carray additional information in a tag object:: - tagref = TagRef.find_all(repo)[0] + tagref = TagRef.list_items(repo)[0] print tagref.commit.message if tagref.tag is not None: print tagref.tag.message @@ -215,14 +215,14 @@ class TagRef(Ref): return None @classmethod - def find_all(cls, repo, common_path = "refs/tags", **kwargs): + def list_items(cls, repo, common_path = "refs/tags", **kwargs): """ Returns git.Tag[] - For more documentation, please refer to git.base.Ref.find_all + For more documentation, please refer to git.base.Ref.list_items """ - return super(TagRef,cls).find_all(repo, common_path, **kwargs) + return super(TagRef,cls).list_items(repo, common_path, **kwargs) # provide an alias |