Created
March 2, 2016 23:47
-
-
Save clojj/aeda15e1b8cddf9c9309 to your computer and use it in GitHub Desktop.
nodegit session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Git = require("nodegit"); | |
var Rx = require("rx"); | |
var repo = Git.Repository.open(".") | |
var mc = repo.then(function(repo){return repo.getMasterCommit()}) | |
var history = mc.then( | |
function(masterCommit){ | |
var hist = masterCommit.history(); | |
Rx.Observable.fromEvent(hist, 'commit').subscribe( | |
function(commit){console.log(commit.messageRaw())}, | |
function(err){}, | |
function(){console.log('complete.')}); | |
hist.start(); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment