.gitignore
This commit is contained in:
parent
53848f1a11
commit
474b259cef
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
node_modules
|
||||
35
index.js
Normal file
35
index.js
Normal file
@ -0,0 +1,35 @@
|
||||
var nodegit = require('nodegit')
|
||||
var path = require('path')
|
||||
|
||||
nodegit.Repository.open(path.resolve(__dirname, './.git'))
|
||||
.then(function(repo) {
|
||||
return repo.getBranchCommit('prototype');
|
||||
})
|
||||
.then(function(first_commit) {
|
||||
var history = first_commit.history(nodegit.Revwalk.SORT.Time);
|
||||
|
||||
history.on("commit", function(commit) {
|
||||
console.log("commit " + commit.sha());
|
||||
console.log("Author:", commit.author().name() +
|
||||
" <" + commit.author().email() + ">");
|
||||
console.log("Date:", commit.date());
|
||||
console.log("\n " + commit.message());
|
||||
|
||||
commit.getTree()
|
||||
.then(function (tree) {
|
||||
var entries = tree.entries();
|
||||
|
||||
// look at diffs here -- as entries grows and does not specify the *specific* entries of this commit
|
||||
|
||||
for(e in entries) {
|
||||
console.log(entries[e].path());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
history.start();
|
||||
|
||||
})
|
||||
.done();
|
||||
26
package.json
Normal file
26
package.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "reckon",
|
||||
"version": "0.0.0",
|
||||
"description": "Reckoning Histories of Computation",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/gauthiier/reckon.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Arcades",
|
||||
"Project"
|
||||
],
|
||||
"author": "gauthiier",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/gauthiier/reckon/issues"
|
||||
},
|
||||
"homepage": "https://github.com/gauthiier/reckon",
|
||||
"dependencies": {
|
||||
"nodegit": "^0.4.0"
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user