File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
GitVersion.Core/VersionCalculation
GitVersion.LibGit2Sharp/Git Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -28,21 +28,21 @@ public bool Exclude(ICommit? commit, out string? reason)
28
28
29
29
if ( commit != null )
30
30
{
31
- var patchPaths = repository . FindPatchPaths ( commit , context . Configuration . TagPrefixPattern ) ;
31
+ var patchPaths = repository . FindPatchPaths ( commit , this . context . Configuration . TagPrefixPattern ) ;
32
32
33
33
if ( patchPaths != null )
34
34
{
35
- switch ( mode )
35
+ switch ( this . mode )
36
36
{
37
37
case PathFilterMode . Inclusive :
38
- if ( ! paths . Any ( path => patchPaths . Any ( p => p . StartsWith ( path , StringComparison . OrdinalIgnoreCase ) ) ) )
38
+ if ( ! this . paths . Any ( path => patchPaths . Any ( p => p . StartsWith ( path , StringComparison . OrdinalIgnoreCase ) ) ) )
39
39
{
40
40
reason = "Source was ignored due to commit path is not present" ;
41
41
return true ;
42
42
}
43
43
break ;
44
44
case PathFilterMode . Exclusive :
45
- if ( paths . Any ( path => patchPaths . All ( p => p . StartsWith ( path , StringComparison . OrdinalIgnoreCase ) ) ) )
45
+ if ( this . paths . Any ( path => patchPaths . All ( p => p . StartsWith ( path , StringComparison . OrdinalIgnoreCase ) ) ) )
46
46
{
47
47
reason = "Source was ignored due to commit path excluded" ;
48
48
return true ;
Original file line number Diff line number Diff line change @@ -58,16 +58,16 @@ public void DiscoverRepository(string? gitDirectory)
58
58
public IEnumerable < string > ? FindPatchPaths ( ICommit commit , string ? tagPrefix )
59
59
{
60
60
Patch ? patch = null ;
61
- var innerCommit = RepositoryInstance . Commits . First ( c => c . Sha == commit . Sha ) ;
61
+ var innerCommit = this . RepositoryInstance . Commits . First ( c => c . Sha == commit . Sha ) ;
62
62
var match = new Regex ( $ "^({ tagPrefix ?? "" } ).*$", RegexOptions . Compiled ) ;
63
63
64
64
if ( ! this . patchCache . ContainsKey ( commit . Sha ) )
65
65
{
66
- if ( ! RepositoryInstance . Tags . Any ( t => t . Target . Sha == commit . Sha && match . IsMatch ( t . FriendlyName ) ) )
66
+ if ( ! this . RepositoryInstance . Tags . Any ( t => t . Target . Sha == commit . Sha && match . IsMatch ( t . FriendlyName ) ) )
67
67
{
68
68
Tree commitTree = innerCommit . Tree ; // Main Tree
69
69
Tree ? parentCommitTree = innerCommit . Parents . FirstOrDefault ( ) ? . Tree ; // Secondary Tree
70
- patch = RepositoryInstance . Diff . Compare < Patch > ( parentCommitTree , commitTree ) ; // Difference
70
+ patch = this . RepositoryInstance . Diff . Compare < Patch > ( parentCommitTree , commitTree ) ; // Difference
71
71
this . patchCache [ commit . Sha ] = patch ;
72
72
}
73
73
}
You can’t perform that action at this time.
0 commit comments