-
Notifications
You must be signed in to change notification settings - Fork 698
Remove git_commit_tree
which duplicates commit.getTree()
#1267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Shouldnt that pointer be a nodegit commit object which then gets unwrapped? |
No, as the wrapped Current libgit2 API: var result = git_commit_tree(tree_out, commit) Current NodeGit API: // generated version
var result = commit.tree(tree_out)
// custom one written in lib/commit.js
commit.getTree().then(function(tree) {
// use the tree
}); So as you can see, the generated NodeGit API already knows what the I guess there are technically three (or more?) things we can do here.
|
This doesn't seem correct. Instead we should kill the getTree function and correct the descriptor for the git_commit_tree generated code. @rcjsuen |
@implausible Thank you for your comment. Should |
a9057c0
to
0537fd6
Compare
@implausible The new change that I've pushed kills |
0537fd6
to
e570bdc
Compare
e570bdc
to
8fc9dfd
Compare
There is a custom handwritte commit.getTree() JavaScript function which conflicts with the git_commit_tree C function provided by libgit2. The custom function has been removed in favour of generating such a function from libgit2's API. Signed-off-by: Remy Suen <remy.suen@gmail.com>
8fc9dfd
to
1da88f3
Compare
libgit2 exposes a
git_commit_tree
function for retrieving theTree
of aCommit
object. In NodeGit, we have our own customgetTree()
which does the same thing.The
tree(tree_out)
function needs a pointer and this does not make any sense in the JavaScript world. The function should be ignored by the code generator.