This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -196,25 +196,22 @@ private int ProcessEvents(Event[] fileEvents)
196
196
// handling events in .git/*
197
197
if ( fileA . IsChildOf ( paths . DotGitPath ) )
198
198
{
199
- if ( fileA . Equals ( paths . DotGitConfig ) )
199
+ if ( ! configChanged && fileA . Equals ( paths . DotGitConfig ) )
200
200
{
201
201
configChanged = true ;
202
- eventsProcessed ++ ;
203
202
}
204
- else if ( fileA . Equals ( paths . DotGitHead ) )
203
+ else if ( ! headChanged && fileA . Equals ( paths . DotGitHead ) )
205
204
{
206
205
if ( fileEvent . Type != EventType . DELETED )
207
206
{
208
207
headContent = paths . DotGitHead . ReadAllLines ( ) . FirstOrDefault ( ) ;
209
208
}
210
209
211
210
headChanged = true ;
212
- eventsProcessed ++ ;
213
211
}
214
- else if ( fileA . Equals ( paths . DotGitIndex ) )
212
+ else if ( ! indexChanged && fileA . Equals ( paths . DotGitIndex ) )
215
213
{
216
214
indexChanged = true ;
217
- eventsProcessed ++ ;
218
215
}
219
216
else if ( fileA . IsChildOf ( paths . RemotesPath ) )
220
217
{
@@ -351,32 +348,35 @@ private int ProcessEvents(Event[] fileEvents)
351
348
}
352
349
353
350
repositoryChanged = true ;
354
- eventsProcessed ++ ;
355
351
}
356
352
}
357
353
358
354
if ( configChanged )
359
355
{
360
356
Logger . Trace ( "ConfigChanged" ) ;
361
357
ConfigChanged ? . Invoke ( ) ;
358
+ eventsProcessed ++ ;
362
359
}
363
360
364
361
if ( headChanged )
365
362
{
366
363
Logger . Trace ( "HeadChanged: {0}" , headContent ?? "[null]" ) ;
367
364
HeadChanged ? . Invoke ( headContent ) ;
365
+ eventsProcessed ++ ;
368
366
}
369
367
370
368
if ( indexChanged )
371
369
{
372
370
Logger . Trace ( "IndexChanged" ) ;
373
371
IndexChanged ? . Invoke ( ) ;
372
+ eventsProcessed ++ ;
374
373
}
375
374
376
375
if ( repositoryChanged )
377
376
{
378
377
Logger . Trace ( "RepositoryChanged" ) ;
379
378
RepositoryChanged ? . Invoke ( ) ;
379
+ eventsProcessed ++ ;
380
380
}
381
381
382
382
return eventsProcessed ;
You can’t perform that action at this time.
0 commit comments