Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove `git_commit_tree` which duplicates `commit.getTree()` #1267
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 |
|
@implausible The new change that I've pushed kills |
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>

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

rcjsuen commentedApr 11, 2017
•
edited
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.