summaryrefslogtreecommitdiff
path: root/src/repository.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-09-21 17:17:10 +0300
committerVicent Marti <tanoku@gmail.com>2010-09-21 17:17:10 +0300
commit2a884588b405c4dee78494119a123fb1878f3490 (patch)
tree04be673b6bd0ea4dd6ac00d8ccf8101e1a9baaec /src/repository.c
parentd45b4a9a1bcbb157a4f02cf5ed23fde5222db9c8 (diff)
downloadlibgit2-2a884588b405c4dee78494119a123fb1878f3490.tar.gz
Add write-back support for git_tree
All the setter methods for git_tree have been added, including the setters for attributes on each git_tree_entry and methods to add/remove entries of the tree. Modified trees and trees created in-memory from scratch can be written back to the repository using git_object_write(). Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/repository.c b/src/repository.c
index dc1fe0e9d..22f2bba40 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -270,6 +270,9 @@ int git_object_write(git_object *object)
break;
case GIT_OBJ_TREE:
+ error = git_tree__writeback((git_tree *)object, source);
+ break;
+
case GIT_OBJ_TAG:
default:
error = GIT_ERROR;