FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/example/convenience-commit.js at master · fatlotus/nodegit · GitHub
fatlotus
nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
example
/
convenience-commit.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
43 lines (33 loc) · 1.06 KB
Breadcrumbs
nodegit
/
example
/
convenience-commit.js
Copy path
File metadata and controls
43 lines (33 loc) · 1.06 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var
git
=
require
(
'../'
)
;
git
.
repo
(
'../.git'
,
function
(
err
,
repo
)
{
if
(
err
)
{
throw
new
Error
(
err
)
;
}
repo
.
commit
(
'59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5'
,
function
(
err
,
commit
)
{
if
(
err
)
{
throw
new
Error
(
err
)
;
}
var
history
=
commit
.
history
(
)
;
history
.
on
(
'commit'
,
function
(
)
{
//console.log(arguments);
}
)
;
history
.
on
(
'end'
,
function
(
commits
)
{
// Read first commit tree
var
tree
=
commits
[
0
]
.
tree
(
)
;
// Synchronous
tree
.
walk
(
function
(
i
,
entry
)
{
console
.
log
(
entry
.
content
)
;
return
false
;
}
)
;
// Asynchronous - not yet implemented
//tree.walk().on( 'entry', function( err, i, entry ) {
// console.log( entry );
//});
}
)
;
}
)
;
//repo.branch( 'master', function( err, branch ) {
// if( err ) { throw new Error( err ); }
// var history = branch.history();
// console.log( history );
// //branch.tree().each( function( i, entry ) {
// // console.log( entry.name );
// // console.log( entry.contents );
// /
/
});
//});
}
)
;
Back
|
FazBrowse Home
|
New Git URL