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

Commit 9268a4d

Browse files
Merge pull request #411 from github-for-unity/fixes/update-repository-info
Changing UpdateRepositoryInfo to ClearRepositoryInfo
2 parents 086ea4a + 17b1c1e commit 9268a4d

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
@@ -442,7 +442,7 @@ private void RepositoryManager_OnCurrentBranchAndRemoteUpdated(ConfigBranch? bra
442442
{
443443
CurrentConfigRemote = remote;
444444
CurrentRemote = GetGitRemote(remote.Value);
445-
UpdateRepositoryInfo();
445+
ClearRepositoryInfo();
446446
}
447447
}) { Affinity = TaskAffinity.UI }.Start();
448448
}
@@ -485,20 +485,10 @@ private void UpdateLocalBranches()
485485
LocalBranches = LocalConfigBranches.Values.Select(GetLocalGitBranch).ToArray();
486486
}
487487

488-
private void UpdateRepositoryInfo()
488+
private void ClearRepositoryInfo()
489489
{
490-
if (CurrentRemote.HasValue)
491-
{
492-
CloneUrl = new UriString(CurrentRemote.Value.Url);
493-
Name = CloneUrl.RepositoryName;
494-
Logger.Trace("CloneUrl: {0}", CloneUrl.ToString());
495-
}
496-
else
497-
{
498-
CloneUrl = null;
499-
Name = LocalPath.FileName;
500-
Logger.Trace("CloneUrl: [NULL]");
501-
}
490+
CloneUrl = null;
491+
Name = null;
502492
}
503493

504494
private void RepositoryManager_OnLocalBranchRemoved(string name)

0 commit comments

Comments
 (0)