Пример #1
0
static VALUE rb_git_commit_tree_SET(VALUE self, VALUE val)
{
    git_commit *commit;
    git_tree *tree;
    Data_Get_Struct(self, git_commit, commit);

    tree = (git_tree *)rugged_object_rb2c(git_object_owner((git_object *)commit), val, GIT_OBJ_TREE);
    git_commit_set_tree(commit, tree);
    return Qnil;
}
Пример #2
0
static VALUE rb_git_commit_tree_SET(VALUE self, VALUE val)
{
	git_commit *commit;
	git_tree *tree;
	RUGGED_OBJ_UNWRAP(self, git_commit, commit);

	tree = (git_tree *)rugged_object_get(git_object_owner((git_object *)commit), val, GIT_OBJ_TREE);
	git_commit_set_tree(commit, tree);
	return Qnil;
}