diff options
author | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2014-02-18 19:27:31 +0100 |
---|---|---|
committer | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2014-03-25 15:28:38 +0100 |
commit | e13d23f0cdb7f9462850b805010f611ad20b6cce (patch) | |
tree | fedde9eeda7debef94eef33872e62fa470b4982d | |
parent | de94e1cf9f1e7bce42670b58b78c3c5f99e08ee4 (diff) | |
download | klausuren-e13d23f0cdb7f9462850b805010f611ad20b6cce.tar.gz klausuren-e13d23f0cdb7f9462850b805010f611ad20b6cce.tar.bz2 klausuren-e13d23f0cdb7f9462850b805010f611ad20b6cce.zip |
Fixed: adapt api changs for pygit2
-rw-r--r-- | fit.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -31,9 +31,9 @@ class Fit: def add_file(self, data, path): """ Inserts the given file in the git tree and commits the changes """ try: - commit = self._get_last_commit() - parents = [commit.oid] - root = commit.tree.oid + commit = self.repo.head.get_object() + parents = commit.parents + root = commit.tree.id except: parents = [] @@ -50,7 +50,7 @@ class Fit: committer, 'added %s' % path, tree, - parents + [p.id for p in parents] ) # save the actual head sha for dump git http protocol |