diff --git a/LibGit2Sharp/Remote.cs b/LibGit2Sharp/Remote.cs
index 95bccb714..08347379f 100644
--- a/LibGit2Sharp/Remote.cs
+++ b/LibGit2Sharp/Remote.cs
@@ -31,10 +31,6 @@ internal Remote(RemoteHandle handle, Repository repository)
{
this.repository = repository;
this.handle = handle;
- Name = Proxy.git_remote_name(handle);
- Url = Proxy.git_remote_url(handle);
- PushUrl = Proxy.git_remote_pushurl(handle);
- TagFetchMode = Proxy.git_remote_autotag(handle);
refSpecs = new RefSpecCollection(this, handle);
repository.RegisterForCleanup(this);
}
@@ -75,12 +71,17 @@ void Dispose(bool disposing)
///
/// Gets the alias of this remote repository.
///
- public virtual string Name { get; private set; }
+ public virtual string Name
+ {
+ get { return Proxy.git_remote_name(handle); }
+ }
///
/// Gets the url to use to communicate with this remote repository.
///
- public virtual string Url { get; private set; }
+ public virtual string Url
+ {
+ get { return Proxy.git_remote_url(handle); } }
///
/// Gets the distinct push url for this remote repository, if set.
@@ -88,14 +89,16 @@ void Dispose(bool disposing)
///
public virtual string PushUrl
{
- get { return pushUrl ?? Url; }
- private set { pushUrl = value; }
+ get { return Proxy.git_remote_pushurl(handle) ?? Url; }
}
///
/// Gets the Tag Fetch Mode of the remote - indicating how tags are fetched.
///
- public virtual TagFetchMode TagFetchMode { get; private set; }
+ public virtual TagFetchMode TagFetchMode
+ {
+ get { return Proxy.git_remote_autotag(handle); }
+ }
///
/// Gets the list of s defined for this