Remove git_commit_tree which duplicates commit.getTree()#1267
Remove git_commit_tree which duplicates commit.getTree()#1267rcjsuen wants to merge 2 commits intonodegit:masterfrom
git_commit_tree which duplicates commit.getTree()#1267Conversation
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 <[email protected]>
8fc9dfd to
1da88f3
Compare
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.