Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions src/GitHub.Api/Git/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ private void RepositoryManager_OnCurrentBranchAndRemoteUpdated(ConfigBranch? bra
{
CurrentConfigRemote = remote;
CurrentRemote = GetGitRemote(remote.Value);
UpdateRepositoryInfo();
ClearRepositoryInfo();
}
}) { Affinity = TaskAffinity.UI }.Start();
}
Expand Down Expand Up @@ -485,20 +485,10 @@ private void UpdateLocalBranches()
LocalBranches = LocalConfigBranches.Values.Select(GetLocalGitBranch).ToArray();
}

private void UpdateRepositoryInfo()
private void ClearRepositoryInfo()
{
if (CurrentRemote.HasValue)
{
CloneUrl = new UriString(CurrentRemote.Value.Url);
Name = CloneUrl.RepositoryName;
Logger.Trace("CloneUrl: {0}", CloneUrl.ToString());
}
else
{
CloneUrl = null;
Name = LocalPath.FileName;
Logger.Trace("CloneUrl: [NULL]");
}
CloneUrl = null;
Name = null;
}

private void RepositoryManager_OnLocalBranchRemoved(string name)
Expand Down