diff options
author | Guido Günther <g.guenther@tarent.de> | 2011-10-28 13:54:51 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-10-28 18:55:49 +0200 |
commit | 004eac7c7c6298b9f1c5e9cc1b6e6dea61433b57 (patch) | |
tree | 1af1a131a386f7049ce73c5167dbea3254280172 /gbp/git.py | |
parent | 27a921eefd474dd7fed0abed8c3667aa4e1bcaa2 (diff) |
GitRepository: add head property to return the current HEAD
Diffstat (limited to 'gbp/git.py')
-rw-r--r-- | gbp/git.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -215,6 +215,11 @@ class GitRepository(object): """The currently checked out branch""" return self.get_branch() + @property + def head(self): + """return the SHA1 of the current HEAD""" + return self.rev_parse('HEAD') + #{ Branches and Merging def create_branch(self, branch, rev=None): """ |