summaryrefslogtreecommitdiff
path: root/lib/git/repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-23 00:14:24 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-23 00:14:24 +0200
commit00499d994fea6fb55a33c788f069782f917dbdd4 (patch)
treef3de7739d34003a7356bd72769f212a47ebc8993 /lib/git/repo.py
parentb2a14e4b96a0ffc5353733b50266b477539ef899 (diff)
parentd1bd99c0a376dec63f0f050aeb0c40664260da16 (diff)
downloadgitpython-00499d994fea6fb55a33c788f069782f917dbdd4.tar.gz
Merge branch 'symbolic_ref' into improvements
* symbolic_ref: SymbolicReferences can now change they references safely as I think and well controlled, including test. Adjusted tests to deal with API changes Added SymbolicReference and HEAD type to better represent these special types of references and allow special handling
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r--lib/git/repo.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py
index b6624d8b..94555a31 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -147,15 +147,12 @@ class Repo(object):
branches = heads
@property
- def head(self,path="HEAD"):
+ def head(self):
"""
Return
- Head Object, reference pointing to commit
-
- ``path``
- path to the head or its name, i.e. master or heads/master
+ HEAD Object pointing to the current head reference
"""
- return Head(self,path)
+ return HEAD(self,'HEAD')
@property
def remotes(self):
@@ -486,8 +483,7 @@ class Repo(object):
Returns
Head to the active branch
"""
- return Head( self, self.git.symbolic_ref('HEAD').strip() )
-
+ return self.head.reference
def blame(self, rev, file):
"""