File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed
src/GitVersion.Core/VersionCalculation Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -35,21 +35,22 @@ private bool IsMatch(string path)
3535 public bool Exclude ( ICommit ? commit , [ NotNullWhen ( true ) ] out string ? reason )
3636 {
3737 reason = null ;
38+ if ( commit == null )
39+ {
40+ return false ;
41+ }
3842
39- if ( commit != null )
43+ switch ( mode )
4044 {
41- switch ( mode )
42- {
43- case PathFilterMode . Inclusive :
45+ case PathFilterMode . Inclusive :
46+ {
47+ if ( commit . DiffPaths . All ( this . IsMatch ) )
4448 {
45- if ( commit . DiffPaths . All ( this . IsMatch ) )
46- {
47- reason = "Source was ignored due to all commit paths matching ignore regex" ;
48- return true ;
49- }
50- break ;
49+ reason = "Source was ignored due to all commit paths matching ignore regex" ;
50+ return true ;
5151 }
52- }
52+ break ;
53+ }
5354 }
5455
5556 return false ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public IEnumerable<BaseVersion> GetBaseVersions(EffectiveBranchConfiguration con
1818 {
1919 configuration . NotNull ( ) ;
2020
21- if ( ! this . Context . Configuration . VersionStrategy . HasFlag ( VersionStrategies . ConfiguredNextVersion ) )
21+ if ( ! Context . Configuration . VersionStrategy . HasFlag ( VersionStrategies . ConfiguredNextVersion ) )
2222 yield break ;
2323
2424 var nextVersion = Context . Configuration . NextVersion ;
You can’t perform that action at this time.
0 commit comments