File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,13 +20,19 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git"))
2020} )
2121. done ( function ( diffList ) {
2222 diffList . forEach ( function ( diff ) {
23- diff . patches ( ) . forEach ( function ( patch ) {
24- console . log ( "diff" , patch . oldFile ( ) . path ( ) , patch . newFile ( ) . path ( ) ) ;
25- patch . hunks ( ) . forEach ( function ( hunk ) {
26- console . log ( hunk . header ( ) . trim ( ) ) ;
27- hunk . lines ( ) . forEach ( function ( line ) {
28- console . log ( String . fromCharCode ( line . origin ( ) ) +
29- line . content ( ) . trim ( ) ) ;
23+ diff . patches ( ) . then ( function ( patches ) {
24+ patches . forEach ( function ( patch ) {
25+ console . log ( "diff" , patch . oldFile ( ) . path ( ) , patch . newFile ( ) . path ( ) ) ;
26+ patch . hunks ( ) . then ( function ( hunks ) {
27+ hunks . forEach ( function ( hunk ) {
28+ console . log ( hunk . header ( ) . trim ( ) ) ;
29+ hunk . lines ( ) . then ( function ( lines ) {
30+ lines . forEach ( function ( line ) {
31+ console . log ( String . fromCharCode ( line . origin ( ) ) +
32+ line . content ( ) . trim ( ) ) ;
33+ } ) ;
34+ } ) ;
35+ } ) ;
3036 } ) ;
3137 } ) ;
3238 } ) ;
You can’t perform that action at this time.
0 commit comments