You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, figured it out. You're working off an old API example. I need to update wherever you found that code.
Try this instead (not sure how to write it in coffeescript):
vargit=require("nodegit");git.repo("./node-mapnik/.git",function(error,repo){if(error){returnconsole.log(error);}repo.branch("master",function(error,branch){if(error){returnconsole.log(error);}// Iterate over the revision historyvarhistory=branch.history();// Commit event is emitted with index 0,n... and commit objecthistory.on('commit',function(commit){// Print out `git log` emulationconsole.log('commit '+commit.sha);console.log(commit.author.name+'<'+commit.author.email+'>');console.log(commit.time);console.log('\n');console.log(commit.message);console.log('\n');});});});
Thx. The example works for me without the index but there is still a problem with the other example when I try to use the walk function on the tree of the branch. See the gist https://gist.github.com/1190940 or take a look at the second example on the homepage. I pasted the assert-problem above. Maybe it's a problem with the templates for instances and objects?
Activity
tbranyen commentedon Sep 3, 2011
Hey @booo I'm looking into this :-)
booo commentedon Sep 3, 2011
Thx for working on this.
Maybe there is a related problem. If I try your other example: https://gist.github.com/1190940
tbranyen commentedon Sep 6, 2011
Hey @booo I'm able to reproduce and am investigating.
tbranyen commentedon Sep 6, 2011
Okay, figured it out. You're working off an old API example. I need to update wherever you found that code.
Try this instead (not sure how to write it in coffeescript):
tbranyen commentedon Sep 6, 2011
Oh additionally
on commitreturns only a commit and not an index anymore. I'll update the README.booo commentedon Sep 6, 2011
Thx. I will check this. I found the examples on http://nodegit.github.com/
booo commentedon Sep 6, 2011
Thx. The example works for me without the index but there is still a problem with the other example when I try to use the walk function on the tree of the branch. See the gist https://gist.github.com/1190940 or take a look at the second example on the homepage. I pasted the assert-problem above. Maybe it's a problem with the templates for instances and objects?
tbranyen commentedon Sep 6, 2011
@booo your second example will not work, that api has been deprecated.
fix a crash when using ssh on mac (nodegit#26)