File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/GitVersion.LibGit2Sharp/Git Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change
1
+ using GitVersion . Extensions ;
1
2
using GitVersion . Helpers ;
2
3
3
4
namespace GitVersion ;
@@ -6,17 +7,16 @@ public class RefSpec : IRefSpec
6
7
{
7
8
private static readonly LambdaEqualityHelper < IRefSpec > equalityHelper = new ( x => x . Specification ) ;
8
9
private static readonly LambdaKeyComparer < IRefSpec , string > comparerHelper = new ( x => x . Specification ) ;
9
-
10
10
private readonly LibGit2Sharp . RefSpec innerRefSpec ;
11
11
12
- internal RefSpec ( LibGit2Sharp . RefSpec refSpec ) => this . innerRefSpec = refSpec ;
12
+ internal RefSpec ( LibGit2Sharp . RefSpec refSpec ) => this . innerRefSpec = refSpec . NotNull ( ) ;
13
13
public int CompareTo ( IRefSpec other ) => comparerHelper . Compare ( this , other ) ;
14
14
public bool Equals ( IRefSpec ? other ) => equalityHelper . Equals ( this , other ) ;
15
- public override bool Equals ( object obj ) => Equals ( ( obj as IRefSpec ) ) ;
16
- public override int GetHashCode ( ) => equalityHelper . GetHashCode ( this ) ;
17
- public override string ToString ( ) => Specification ;
18
15
public string Specification => this . innerRefSpec . Specification ;
19
16
public RefSpecDirection Direction => ( RefSpecDirection ) this . innerRefSpec . Direction ;
20
17
public string Source => this . innerRefSpec . Source ;
21
18
public string Destination => this . innerRefSpec . Destination ;
19
+ public override bool Equals ( object obj ) => Equals ( ( obj as IRefSpec ) ) ;
20
+ public override int GetHashCode ( ) => equalityHelper . GetHashCode ( this ) ;
21
+ public override string ToString ( ) => Specification ;
22
22
}
You can’t perform that action at this time.
0 commit comments