File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { CommitInfo, FullResult } from '../../types';
55import { getActualGitRepoRoot } from "../../utils" ;
66
77export class FullProcess < T extends keyof Mapper > extends BaseProcess < T > {
8+ private firstGitMessage : CommitInfo = { } ;
9+
810 constructor ( lcovPath : string | string [ ] , opts : BaseProcessOpts < T > = { stream : { } } ) {
911 super ( ) ;
1012
@@ -31,7 +33,7 @@ export class FullProcess<T extends keyof Mapper> extends BaseProcess<T> {
3133 createInfo = await this . getCreateInfo ( ) ;
3234
3335 if ( createInfo ) {
34- this . firstInfo = createInfo as CommitInfo ;
36+ this . firstGitMessage = createInfo as CommitInfo ;
3537 }
3638 }
3739
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class IncreaseProcess<T extends keyof Mapper> extends BaseProcess<T> {
6060 const createInfo = await this . getCreateInfo ( ) as CommitInfo ;
6161
6262 // 得到创建信息
63- this . firstInfo = createInfo ;
63+ this . firstGitMessage = createInfo ;
6464
6565 // 得到增量合并结果
6666 await this . getLcov ( ) ;
@@ -92,7 +92,7 @@ export class IncreaseProcess<T extends keyof Mapper> extends BaseProcess<T> {
9292 this . lcov = (
9393 await new IncreaseConcat ( {
9494 cwd : this . opts . cwd ,
95- hash : this . firstGitMessage . hash ,
95+ hash : this . firstGitMessage ? .hash ,
9696 } ) . concat ( ...res )
9797 ) . getRes ( ) ;
9898 }
Original file line number Diff line number Diff line change @@ -36,8 +36,6 @@ export abstract class BaseProcess<T extends keyof Mapper> {
3636 files : [ ] ,
3737 } ;
3838
39- protected firstInfo : CommitInfo | undefined ;
40-
4139 abstract async exec ( ) : Promise < FullResult > ;
4240
4341 /**
You can’t perform that action at this time.
0 commit comments