Remove git_commit_tree which duplicates commit.getTree()#1267
Conversation
Shouldnt that pointer be a nodegit commit object which then gets unwrapped? |
Sorry, something went wrong.
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.
|
Sorry, something went wrong.
|
This doesn't seem correct. Instead we should kill the getTree function and correct the descriptor for the git_commit_tree generated code. @rcjsuen |
Sorry, something went wrong.
|
@implausible Thank you for your comment. Should |
Sorry, something went wrong.
a9057c0 to
0537fd6
Compare
October 24, 2017 10:57
|
@implausible The new change that I've pushed kills |
Sorry, something went wrong.
0537fd6 to
e570bdc
Compare
November 29, 2017 09:22
e570bdc to
8fc9dfd
Compare
December 20, 2017 21:34
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
March 19, 2018 21:44
libgit2 exposes a
git_commit_treefunction for retrieving theTreeof aCommitobject. 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.