File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ function fileDates(file, c) {
2424 function takeTime ( str ) {
2525 return Number ( str . match ( / ^ ( \S + ) \s / ) [ 1 ] ) * 1000 ;
2626 }
27- require ( "child_process" ) . exec ( "git rev-list --timestamp HEAD -- " + file , function ( err , stdout ) {
27+ require ( "child_process" ) . exec ( "git rev-list --timestamp HEAD -- " + file + ".md" , function ( err , stdout ) {
2828 if ( err != null ) { console . log ( "Failed to run git rev-list" ) ; return ; }
2929 var history = stdout . split ( "\n" ) ;
3030 if ( history . length && history [ history . length - 1 ] == "" ) history . pop ( ) ;
31- var created = history . length ? takeTime ( history [ 0 ] ) : Date . now ( ) ;
31+ var created = history . length ? takeTime ( history [ history . length - 1 ] ) : Date . now ( ) ;
3232 var modified = created ;
33- if ( history . length > 1 ) modified = takeTime ( history [ history . length - 1 ] ) ;
33+ if ( history . length > 1 ) modified = takeTime ( history [ 0 ] ) ;
3434 c ( created , modified ) ;
3535 } ) ;
3636}
You can’t perform that action at this time.
0 commit comments