@@ -333,7 +333,7 @@ function sanitizePath(path: string): string {
333333 return path . replace ( / ^ ( [ a - z ] ) : \\ / i, ( _ , letter ) => `${ letter . toUpperCase ( ) } :\\` ) ;
334334}
335335
336- const COMMIT_FORMAT = '%H%n%aN%n%aE%n%at%n%ct%n% P%n%B' ;
336+ const COMMIT_FORMAT = '%H%n%aN%n%aE%n%at%n%P%n%B' ;
337337
338338export class Git {
339339
@@ -525,7 +525,6 @@ export interface Commit {
525525 authorDate ?: Date ;
526526 authorName ?: string ;
527527 authorEmail ?: string ;
528- commitDate ?: Date ;
529528}
530529
531530export class GitStatusParser {
@@ -656,16 +655,15 @@ export function parseGitmodules(raw: string): Submodule[] {
656655 return result ;
657656}
658657
659- const commitRegex = / ( [ 0 - 9 a - f ] { 40 } ) \n ( .* ) \n ( .* ) \n ( .* ) \n ( .* ) \n ( . * ) (?: \n ( [ ^ ] * ?) ) ? (?: \x00 ) / gm;
658+ const commitRegex = / ( [ 0 - 9 a - f ] { 40 } ) \n ( .* ) \n ( .* ) \n ( .* ) \n ( .* ) (?: \n ( [ ^ ] * ?) ) ? (?: \x00 ) / gm;
660659
661660export function parseGitCommits ( data : string ) : Commit [ ] {
662661 let commits : Commit [ ] = [ ] ;
663662
664663 let ref ;
665- let authorName ;
666- let authorEmail ;
667- let authorDate ;
668- let commitDate ;
664+ let name ;
665+ let email ;
666+ let date ;
669667 let parents ;
670668 let message ;
671669 let match ;
@@ -676,7 +674,7 @@ export function parseGitCommits(data: string): Commit[] {
676674 break ;
677675 }
678676
679- [ , ref , authorName , authorEmail , authorDate , commitDate , parents , message ] = match ;
677+ [ , ref , name , email , date , parents , message ] = match ;
680678
681679 if ( message [ message . length - 1 ] === '\n' ) {
682680 message = message . substr ( 0 , message . length - 1 ) ;
@@ -687,10 +685,9 @@ export function parseGitCommits(data: string): Commit[] {
687685 hash : ` ${ ref } ` . substr ( 1 ) ,
688686 message : ` ${ message } ` . substr ( 1 ) ,
689687 parents : parents ? parents . split ( ' ' ) : [ ] ,
690- authorDate : new Date ( Number ( authorDate ) * 1000 ) ,
691- authorName : ` ${ authorName } ` . substr ( 1 ) ,
692- authorEmail : ` ${ authorEmail } ` . substr ( 1 ) ,
693- commitDate : new Date ( Number ( commitDate ) * 1000 ) ,
688+ authorDate : new Date ( Number ( date ) * 1000 ) ,
689+ authorName : ` ${ name } ` . substr ( 1 ) ,
690+ authorEmail : ` ${ email } ` . substr ( 1 )
694691 } ) ;
695692 } while ( true ) ;
696693
0 commit comments