Skip to content

"get_subtree" of "Rugged::Tree" no longer worked, add "path" instead #93

Merged
merged 3 commits into from Jul 21, 2012

2 participants

@yandy
yandy commented Jul 19, 2012

As libgit2 has killed "git_tree_get_subtree" and use "git_tree_entry_bypath" instead, the "get_subtree" method of Rugged::Tree no longer worked

I've make "path" method instead, which use "git_tree_entry_bypath", and return an entry

@yandy yandy use path method instead of get_subtree for "Rugged::Tree"
As libgit2 has killed "git_tree_get_subtree" and use
"git_tree_entry_bypath" instead, the get_subtree method of Rugged::Tree
no longer worked
63db048
@vmg
libgit2 member
vmg commented Jul 20, 2012

:+1: Can you kill get_subtree altogether?

@yandy
yandy commented Jul 21, 2012

@tanoku Done:-)

@vmg vmg and 1 other commented on an outdated diff Jul 21, 2012
ext/rugged/rugged_tree.c
- return rugged_object_new(owner, (git_object *)subtree);
+ return rb_git_treeentry_fromC(entry);
@vmg
libgit2 member
vmg added a note Jul 21, 2012

You need to free the returned tree entry, after having created the Ruby object.

@yandy
yandy added a note Jul 21, 2012

My mistake, Done:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@yandy yandy Free the "tree entry" when needed
in "rb_git_tree_path" function, free the tree entry after having created
the Ruby object.
e9de526
@vmg vmg merged commit 11b7376 into libgit2:development Jul 21, 2012
@vmg
libgit2 member
vmg commented Jul 21, 2012

:sparkles:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.