Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 1aaf329

Browse files
Changing UpdateRepositoryInfo to ClearRepositoryInfo
1 parent 34b2cc8 commit 1aaf329

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/GitHub.Api/Git/Repository.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ private void RepositoryManager_OnCurrentBranchAndRemoteUpdated(ConfigBranch? bra
417417
{
418418
CurrentConfigRemote = remote;
419419
CurrentRemote = GetGitRemote(remote.Value);
420-
UpdateRepositoryInfo();
420+
ClearRepositoryInfo();
421421
}
422422
}) { Affinity = TaskAffinity.UI }.Start();
423423
}
@@ -460,20 +460,10 @@ private void UpdateLocalBranches()
460460
LocalBranches = LocalConfigBranches.Values.Select(GetLocalGitBranch).ToArray();
461461
}
462462

463-
private void UpdateRepositoryInfo()
463+
private void ClearRepositoryInfo()
464464
{
465-
if (CurrentRemote.HasValue)
466-
{
467-
CloneUrl = new UriString(CurrentRemote.Value.Url);
468-
Name = CloneUrl.RepositoryName;
469-
Logger.Trace("CloneUrl: {0}", CloneUrl.ToString());
470-
}
471-
else
472-
{
473-
CloneUrl = null;
474-
Name = LocalPath.FileName;
475-
Logger.Trace("CloneUrl: [NULL]");
476-
}
465+
CloneUrl = new UriString(CurrentRemote.Value.Url);
466+
Name = CloneUrl.RepositoryName;
477467
}
478468

479469
private void RepositoryManager_OnLocalBranchRemoved(string name)

0 commit comments

Comments
 (0)