diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-22 23:20:16 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-22 23:20:16 +0200 |
commit | 58e2157ad3aa9d75ef4abb90eb2d1f01fba0ba2b (patch) | |
tree | 3487e8a52687317cba7cc369a094459db4fdd770 /lib/git/repo.py | |
parent | b2a14e4b96a0ffc5353733b50266b477539ef899 (diff) | |
download | gitpython-58e2157ad3aa9d75ef4abb90eb2d1f01fba0ba2b.tar.gz |
Added SymbolicReference and HEAD type to better represent these special types of references and allow special handling
Head.reset now is an instance method of HEAD type
Concatenated all reference specific tests into test_refs
started to fix tests breaking now because of changed interface
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r-- | lib/git/repo.py | 12 |
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): """ |