public bool Equals(ConfigRemote other) { return (String.Equals(name, other.name) && String.Equals(url, other.url) ); }
public void UpdateData(IRepositoryInfoCacheData data) { var now = DateTimeOffset.Now; var isUpdated = false; if (!Nullable.Equals(currentGitRemote, data.CurrentGitRemote)) { currentGitRemote = data.CurrentGitRemote ?? GitRemote.Default; isUpdated = true; } if (!Nullable.Equals(currentGitBranch, data.CurrentGitBranch)) { currentGitBranch = data.CurrentGitBranch ?? GitBranch.Default; isUpdated = true; } if (!Nullable.Equals(currentConfigRemote, data.CurrentConfigRemote)) { currentConfigRemote = data.CurrentConfigRemote ?? ConfigRemote.Default; isUpdated = true; } if (!Nullable.Equals(currentConfigBranch, data.CurrentConfigBranch)) { currentConfigBranch = data.CurrentConfigBranch ?? ConfigBranch.Default; isUpdated = true; } SaveData(now, isUpdated); }
private static GitRemote GetGitRemote(ConfigRemote configRemote) => new GitRemote(configRemote.Name, configRemote.Url);
private static GitRemote GetGitRemote(ConfigRemote configRemote) { return(new GitRemote(configRemote.Name, configRemote.Url)); }
private GitRemote GetGitRemote(ConfigRemote configRemote) { return(new GitRemote { Name = configRemote.Name, Url = configRemote.Url }); }
public ConfigBranch(string name, ConfigRemote?remote, string trackingBranch) { this.name = name; this.remote = remote ?? ConfigRemote.Default; this.trackingBranch = trackingBranch != null && trackingBranch.StartsWith("refs/heads") ? trackingBranch.Substring("refs/heads".Length + 1) : null; }
public ConfigBranch(string name) { this.name = name; this.trackingBranch = null; remote = ConfigRemote.Default; }
public ConfigBranch(string name, ConfigRemote?remote) { this.name = name; this.remote = remote ?? ConfigRemote.Default; }
public ConfigBranch(string name) { this.name = name; remote = ConfigRemote.Default; }