File tree 1 file changed +3
-3
lines changed
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) {
24
24
function takeTime ( str ) {
25
25
return Number ( str . match ( / ^ ( \S + ) \s / ) [ 1 ] ) * 1000 ;
26
26
}
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 ) {
28
28
if ( err != null ) { console . log ( "Failed to run git rev-list" ) ; return ; }
29
29
var history = stdout . split ( "\n" ) ;
30
30
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 ( ) ;
32
32
var modified = created ;
33
- if ( history . length > 1 ) modified = takeTime ( history [ history . length - 1 ] ) ;
33
+ if ( history . length > 1 ) modified = takeTime ( history [ 0 ] ) ;
34
34
c ( created , modified ) ;
35
35
} ) ;
36
36
}
You can’t perform that action at this time.
0 commit comments