Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gdatastore/datastore.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/gdatastore/datastore.py b/gdatastore/datastore.py
index 4b5064f..ae9a657 100644
--- a/gdatastore/datastore.py
+++ b/gdatastore/datastore.py
@@ -583,16 +583,6 @@ class InternalApi(object):
os.makedirs(self._git_dir)
self._git_call('init', ['-q', '--bare'])
- def _find_git_parent(self, tree_id, parent_id):
- if not parent_id:
- return None
-
- try:
- return self._git_call('rev-parse',
- [_format_ref(tree_id, parent_id)]).strip()
- except GitError:
- return None
-
def _format_commit_message(self, metadata):
return pprint.pformat(to_native(metadata))
@@ -624,13 +614,9 @@ class InternalApi(object):
return self._create_repo()
def _store_entry(self, tree_id, version_id, parent_id, path, metadata):
- parent_hash = self._find_git_parent(tree_id, parent_id)
commit_message = self._format_commit_message(metadata)
tree_hash = self._write_tree(path)
- commit_options = [tree_hash]
- if parent_hash:
- commit_options += ['-p', parent_hash]
- commit_hash = self._git_call('commit-tree', commit_options,
+ commit_hash = self._git_call('commit-tree', [tree_hash],
input=commit_message).strip()
self._git_call('update-ref', [_format_ref(tree_id, version_id),
commit_hash])