Method: Rugged::Tree::Builder#write

Defined in:
ext/rugged/rugged_tree.c

#writeObject

Write builder‘s content as a tree to the repository that owns the builder and return the oid for the newly created tree.

[View source]

857
858
859
860
861
862
863
864
865
866
867
868
869
# File 'ext/rugged/rugged_tree.c', line 857

static VALUE rb_git_treebuilder_write(VALUE self)
{
	git_treebuilder *builder;
	git_oid written_id;
	int error;

	Data_Get_Struct(self, git_treebuilder, builder);

	error = git_treebuilder_write(&written_id, builder);
	rugged_exception_check(error);

	return rugged_create_oid(&written_id);
}