File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/GitVersion.LibGit2Sharp/Git Expand file tree Collapse file tree 1 file changed +6
-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 ;
@@ -9,13 +10,10 @@ internal sealed class Remote : IRemote
9
10
10
11
private readonly LibGit2Sharp . Remote innerRemote ;
11
12
12
- internal Remote ( LibGit2Sharp . Remote remote ) => this . innerRemote = remote ;
13
+ internal Remote ( LibGit2Sharp . Remote remote ) => this . innerRemote = remote . NotNull ( ) ;
13
14
14
15
public int CompareTo ( IRemote other ) => comparerHelper . Compare ( this , other ) ;
15
16
public bool Equals ( IRemote ? other ) => equalityHelper . Equals ( this , other ) ;
16
- public override bool Equals ( object obj ) => Equals ( ( obj as IRemote ) ) ;
17
- public override int GetHashCode ( ) => equalityHelper . GetHashCode ( this ) ;
18
- public override string ToString ( ) => Name ;
19
17
public string Name => this . innerRemote . Name ;
20
18
public string Url => this . innerRemote . Url ;
21
19
@@ -29,7 +27,10 @@ public IEnumerable<IRefSpec> RefSpecs
29
27
: new RefSpecCollection ( ( LibGit2Sharp . RefSpecCollection ) refSpecs ) ;
30
28
}
31
29
}
32
- public IEnumerable < IRefSpec > FetchRefSpecs => RefSpecs . Where ( x => x . Direction == RefSpecDirection . Fetch ) ;
33
30
31
+ public IEnumerable < IRefSpec > FetchRefSpecs => RefSpecs . Where ( x => x . Direction == RefSpecDirection . Fetch ) ;
34
32
public IEnumerable < IRefSpec > PushRefSpecs => RefSpecs . Where ( x => x . Direction == RefSpecDirection . Push ) ;
33
+ public override bool Equals ( object obj ) => Equals ( ( obj as IRemote ) ) ;
34
+ public override int GetHashCode ( ) => equalityHelper . GetHashCode ( this ) ;
35
+ public override string ToString ( ) => Name ;
35
36
}
You can’t perform that action at this time.
0 commit comments