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

Commit f7df0db

Browse files
Merge branch 'fixes/update-repository-info' into enhancements/repository-watcher-refactor
2 parents bddb47d + 8c2130c commit f7df0db

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
@@ -361,7 +361,7 @@ private void RepositoryManagerOnCurrentBranchUpdated(ConfigBranch? branch, Confi
361361
{
362362
CurrentConfigRemote = remote;
363363
CurrentRemote = GetGitRemote(remote.Value);
364-
UpdateRepositoryInfo();
364+
ClearRepositoryInfo();
365365
}
366366
}) { Affinity = TaskAffinity.UI }.Start();
367367
}
@@ -403,20 +403,10 @@ private void UpdateLocalBranches()
403403
LocalBranches = LocalConfigBranches.Values.Select(GetLocalGitBranch).ToArray();
404404
}
405405

406-
private void UpdateRepositoryInfo()
406+
private void ClearRepositoryInfo()
407407
{
408-
if (CurrentRemote.HasValue)
409-
{
410-
CloneUrl = new UriString(CurrentRemote.Value.Url);
411-
Name = CloneUrl.RepositoryName;
412-
Logger.Trace("CloneUrl: {0}", CloneUrl.ToString());
413-
}
414-
else
415-
{
416-
CloneUrl = null;
417-
Name = LocalPath.FileName;
418-
Logger.Trace("CloneUrl: [NULL]");
419-
}
408+
CloneUrl = null;
409+
Name = null;
420410
}
421411

422412
private GitBranch GetLocalGitBranch(ConfigBranch x)

0 commit comments

Comments
 (0)