summaryrefslogtreecommitdiff
path: root/lib/git/head.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-11 16:49:05 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-11 16:49:05 +0200
commit9374a916588d9fe7169937ba262c86ad710cfa74 (patch)
treedfe77a02cfa3fbe34563326cea95e92694d21b9a /lib/git/head.py
parent20f202d83bdf1f332a3cb8f010bcf8bf3c2807bd (diff)
downloadgitpython-9374a916588d9fe7169937ba262c86ad710cfa74.tar.gz
converted all spaces to tabs ( 4 spaces = 1 tab ) just to allow me and my editor to work with the files properly. Can convert it back for releaes
Diffstat (limited to 'lib/git/head.py')
-rw-r--r--lib/git/head.py106
1 files changed, 53 insertions, 53 deletions
diff --git a/lib/git/head.py b/lib/git/head.py
index 3c3f13ac..f4e94637 100644
--- a/lib/git/head.py
+++ b/lib/git/head.py
@@ -8,56 +8,56 @@ 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'
- """
-
- def __init__(self, path, commit):
- """
- Initialize a newly instanced Head
-
- ``path``
- is the path to the head ref, relative to the .git directory, i.e.
- refs/heads/master
-
- `commit`
- is the Commit object that the head points to
- """
- super(Head, self).__init__(name, commit)
-
-
- @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
+ """
+ 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'
+ """
+
+ def __init__(self, path, commit):
+ """
+ Initialize a newly instanced Head
+
+ ``path``
+ is the path to the head ref, relative to the .git directory, i.e.
+ refs/heads/master
+
+ `commit`
+ is the Commit object that the head points to
+ """
+ super(Head, self).__init__(name, commit)
+
+
+ @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