diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-12 11:50:14 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-12 11:50:14 +0200 |
commit | f2834177c0fdf6b1af659e460fd3348f468b8ab0 (patch) | |
tree | 2cb12187e664a026974383ed303cf307df2d4029 /lib/git/head.py | |
parent | 3c0a65226f038c58fc6d6ed525f38fc00b3579b7 (diff) | |
download | gitpython-f2834177c0fdf6b1af659e460fd3348f468b8ab0.tar.gz |
Reorganized package structure and cleaned up imports
Diffstat (limited to 'lib/git/head.py')
-rw-r--r-- | lib/git/head.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/lib/git/head.py b/lib/git/head.py deleted file mode 100644 index 42dfd735..00000000 --- a/lib/git/head.py +++ /dev/null @@ -1,49 +0,0 @@ -# head.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors -# -# This module is part of GitPython and is released under -# the BSD License: http://www.opensource.org/licenses/bsd-license.php - -import commit -import base - -class Head(base.Ref): - """ - A Head is a named reference to a Commit. Every Head instance contains a name - and a Commit object. - - Examples:: - - >>> repo = Repo("/path/to/repo") - >>> head = repo.heads[0] - - >>> head.name - 'master' - - >>> head.commit - <git.Commit "1c09f116cbc2cb4100fb6935bb162daa4723f455"> - - >>> head.commit.id - '1c09f116cbc2cb4100fb6935bb162daa4723f455' - """ - - @property - def commit(self): - """ - Returns - Commit object the head points to - """ - return self.object - - @classmethod - def find_all(cls, repo, common_path = "refs/heads", **kwargs): - """ - Returns - git.Head[] - - For more documentation, please refer to git.base.Ref.find_all - """ - return super(Head,cls).find_all(repo, common_path, **kwargs) - - def __repr__(self): - return '<git.Head "%s">' % self.name |