diff options
author | Guido Guenther <agx@sigxcpu.org> | 2008-04-24 16:58:54 +0200 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2008-04-24 16:58:54 +0200 |
commit | 097ea117e7225b8c2777f31cbd0e0395cc90b149 (patch) | |
tree | 582a21cb12d9c6436b466928ead8e712971d5ffe | |
parent | 8df585e228eb1abe9b7c4ef6300d110121f6c474 (diff) |
add write_tree
-rw-r--r-- | gbp/git_utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gbp/git_utils.py b/gbp/git_utils.py index 15136c2c..21823f73 100644 --- a/gbp/git_utils.py +++ b/gbp/git_utils.py @@ -110,6 +110,12 @@ class GitRepository(object): raise GitRepositoryError, "can't get %s" % id return commit + def write_tree(self): + """write out the current index, return the SHA1""" + tree, ret = self.__git_getoutput('write-tree') + if ret: + raise GitRepositoryError, "can't write out current index" + return tree[0].strip() def build_tag(format, version): """Generate a tag from a given format and a version""" |