@@ -16,6 +16,7 @@ const getCachedDiff = (filePath: string, staged: boolean) =>
16
16
17
17
const diffCache = new Map < string , string > ( ) ;
18
18
const getDiffForFile = ( filePath : string , staged = false ) : string => {
19
+ // console.log("getDiffForFile")
19
20
let diff = getCachedDiff ( filePath , staged ) ;
20
21
if ( diff === undefined ) {
21
22
const command = [
@@ -41,6 +42,7 @@ const getDiffForFile = (filePath: string, staged = false): string => {
41
42
42
43
let diffFileListCache : string [ ] ;
43
44
const getDiffFileList = ( staged = false ) : string [ ] => {
45
+ // console.log("getDiffFileList")
44
46
if ( diffFileListCache === undefined ) {
45
47
const command = [
46
48
"git" ,
@@ -65,16 +67,18 @@ const getDiffFileList = (staged = false): string[] => {
65
67
66
68
let gitFileListCache : string [ ] ;
67
69
const getGitFileList = ( ) : string [ ] => {
70
+ // console.log("getGitFileList")
68
71
if ( gitFileListCache === undefined ) {
69
72
const command = [ "git" , "ls-files" ] . filter ( Boolean ) . join ( " " ) ;
70
73
71
74
gitFileListCache = child_process
72
- . execSync ( command )
73
- . toString ( )
74
- . trim ( )
75
- . split ( "\n" )
76
- . map ( ( filePath ) => path . resolve ( filePath ) ) ;
75
+ . execSync ( command )
76
+ . toString ( )
77
+ . trim ( )
78
+ . split ( "\n" )
79
+ . map ( ( filePath ) => path . resolve ( filePath ) ) ;
77
80
}
81
+ // console.log({gitFileListCache},gitFileListCache.join("\n"))
78
82
return gitFileListCache ;
79
83
} ;
80
84
@@ -91,7 +95,35 @@ const getIgnorePatterns = (staged = false): string[] => {
91
95
path . join ( "/" , path . relative ( process . cwd ( ) , x ) )
92
96
) ;
93
97
94
- console . log ( { willBeChecked } ) ;
98
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
99
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
100
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
101
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
102
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
103
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
104
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
105
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
106
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
107
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
108
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
109
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
110
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
111
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
112
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
113
+ console . log ( "😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀" ) ;
114
+ console . log ( "will be checked" + willBeChecked . join ( "\n" ) ) ;
115
+ console . log ( "------------------" ) ;
116
+ console . log ( "------------------" ) ;
117
+ console . log ( "------------------" ) ;
118
+ console . log ( "------------------" ) ;
119
+ console . log ( "------------------" ) ;
120
+ console . log ( "------------------" ) ;
121
+ console . log ( "------------------" ) ;
122
+ console . log ( "------------------" ) ;
123
+ console . log ( "------------------" ) ;
124
+ console . log ( "------------------" ) ;
125
+ console . log ( "------------------" ) ;
126
+ console . log ( "will be ignored" + newList . join ( "\n" ) ) ;
95
127
return result ;
96
128
} ;
97
129
@@ -140,7 +172,6 @@ const getRangesForDiff = (diff: string): Range[] => {
140
172
141
173
export {
142
174
getDiffForFile ,
143
- getGitFileList ,
144
175
getIgnorePatterns ,
145
176
getRangesForDiff ,
146
177
getDiffFileList ,
0 commit comments