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)
196196 // handling events in .git/*
197197 if ( fileA . IsChildOf ( paths . DotGitPath ) )
198198 {
199- if ( fileA . Equals ( paths . DotGitConfig ) )
199+ if ( ! configChanged && fileA . Equals ( paths . DotGitConfig ) )
200200 {
201201 configChanged = true ;
202- eventsProcessed ++ ;
203202 }
204- else if ( fileA . Equals ( paths . DotGitHead ) )
203+ else if ( ! headChanged && fileA . Equals ( paths . DotGitHead ) )
205204 {
206205 if ( fileEvent . Type != EventType . DELETED )
207206 {
208207 headContent = paths . DotGitHead . ReadAllLines ( ) . FirstOrDefault ( ) ;
209208 }
210209
211210 headChanged = true ;
212- eventsProcessed ++ ;
213211 }
214- else if ( fileA . Equals ( paths . DotGitIndex ) )
212+ else if ( ! indexChanged && fileA . Equals ( paths . DotGitIndex ) )
215213 {
216214 indexChanged = true ;
217- eventsProcessed ++ ;
218215 }
219216 else if ( fileA . IsChildOf ( paths . RemotesPath ) )
220217 {
@@ -351,32 +348,35 @@ private int ProcessEvents(Event[] fileEvents)
351348 }
352349
353350 repositoryChanged = true ;
354- eventsProcessed ++ ;
355351 }
356352 }
357353
358354 if ( configChanged )
359355 {
360356 Logger . Trace ( "ConfigChanged" ) ;
361357 ConfigChanged ? . Invoke ( ) ;
358+ eventsProcessed ++ ;
362359 }
363360
364361 if ( headChanged )
365362 {
366363 Logger . Trace ( "HeadChanged: {0}" , headContent ?? "[null]" ) ;
367364 HeadChanged ? . Invoke ( headContent ) ;
365+ eventsProcessed ++ ;
368366 }
369367
370368 if ( indexChanged )
371369 {
372370 Logger . Trace ( "IndexChanged" ) ;
373371 IndexChanged ? . Invoke ( ) ;
372+ eventsProcessed ++ ;
374373 }
375374
376375 if ( repositoryChanged )
377376 {
378377 Logger . Trace ( "RepositoryChanged" ) ;
379378 RepositoryChanged ? . Invoke ( ) ;
379+ eventsProcessed ++ ;
380380 }
381381
382382 return eventsProcessed ;
You can’t perform that action at this time.
0 commit comments