@@ -15,7 +15,7 @@ namespace LibGit2Sharp
1515 public class Remote : IEquatable < Remote > , IBelongToARepository
1616 {
1717 private static readonly LambdaEqualityHelper < Remote > equalityHelper =
18- new LambdaEqualityHelper < Remote > ( x => x . Name , x => x . Url ) ;
18+ new LambdaEqualityHelper < Remote > ( x => x . Name , x => x . Url , x => x . PushUrl ) ;
1919
2020 internal readonly Repository repository ;
2121
@@ -32,6 +32,7 @@ private Remote(RemoteSafeHandle handle, Repository repository)
3232 this . repository = repository ;
3333 Name = Proxy . git_remote_name ( handle ) ;
3434 Url = Proxy . git_remote_url ( handle ) ;
35+ PushUrl = Proxy . git_remote_pushurl ( handle ) ;
3536 TagFetchMode = Proxy . git_remote_autotag ( handle ) ;
3637 refSpecs = new RefSpecCollection ( handle ) ;
3738 }
@@ -53,6 +54,12 @@ internal static Remote BuildFromPtr(RemoteSafeHandle handle, Repository repo)
5354 /// </summary>
5455 public virtual string Url { get ; private set ; }
5556
57+ /// <summary>
58+ /// Gets the distinct push url for this remote repository, if set.
59+ /// If no separate push url is specified, PushUrl is null.
60+ /// </summary>
61+ public virtual string PushUrl { get ; private set ; }
62+
5663 /// <summary>
5764 /// Gets the Tag Fetch Mode of the remote - indicating how tags are fetched.
5865 /// </summary>
0 commit comments