@@ -31,10 +31,6 @@ internal Remote(RemoteHandle handle, Repository repository)
31
31
{
32
32
this . repository = repository ;
33
33
this . handle = handle ;
34
- Name = Proxy . git_remote_name ( handle ) ;
35
- Url = Proxy . git_remote_url ( handle ) ;
36
- PushUrl = Proxy . git_remote_pushurl ( handle ) ;
37
- TagFetchMode = Proxy . git_remote_autotag ( handle ) ;
38
34
refSpecs = new RefSpecCollection ( this , handle ) ;
39
35
repository . RegisterForCleanup ( this ) ;
40
36
}
@@ -75,27 +71,34 @@ void Dispose(bool disposing)
75
71
/// <summary>
76
72
/// Gets the alias of this remote repository.
77
73
/// </summary>
78
- public virtual string Name { get ; private set ; }
74
+ public virtual string Name
75
+ {
76
+ get { return Proxy . git_remote_name ( handle ) ; }
77
+ }
79
78
80
79
/// <summary>
81
80
/// Gets the url to use to communicate with this remote repository.
82
81
/// </summary>
83
- public virtual string Url { get ; private set ; }
82
+ public virtual string Url
83
+ {
84
+ get { return Proxy . git_remote_url ( handle ) ; } }
84
85
85
86
/// <summary>
86
87
/// Gets the distinct push url for this remote repository, if set.
87
88
/// Defaults to the fetch url (<see cref="Url"/>) if not set.
88
89
/// </summary>
89
90
public virtual string PushUrl
90
91
{
91
- get { return pushUrl ?? Url ; }
92
- private set { pushUrl = value ; }
92
+ get { return Proxy . git_remote_pushurl ( handle ) ?? Url ; }
93
93
}
94
94
95
95
/// <summary>
96
96
/// Gets the Tag Fetch Mode of the remote - indicating how tags are fetched.
97
97
/// </summary>
98
- public virtual TagFetchMode TagFetchMode { get ; private set ; }
98
+ public virtual TagFetchMode TagFetchMode
99
+ {
100
+ get { return Proxy . git_remote_autotag ( handle ) ; }
101
+ }
99
102
100
103
/// <summary>
101
104
/// Gets the list of <see cref="RefSpec"/>s defined for this <see cref="Remote"/>
0 commit comments