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

Commit 3734dbe

Browse files
Merge branch 'master' into fixes/stop-watcher-for-commit
2 parents 5eb059b + ca56968 commit 3734dbe

File tree

2 files changed

+194
-78
lines changed

2 files changed

+194
-78
lines changed

src/GitHub.Api/Git/Repository.cs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ private void CacheContainer_OnCacheInvalidated(CacheType cacheType)
323323
case CacheType.GitUserCache:
324324
break;
325325

326+
case CacheType.RepositoryInfoCache:
327+
break;
328+
326329
default:
327330
throw new ArgumentOutOfRangeException(nameof(cacheType), cacheType, null);
328331
}
@@ -442,7 +445,7 @@ private void RepositoryManager_OnCurrentBranchAndRemoteUpdated(ConfigBranch? bra
442445
{
443446
CurrentConfigRemote = remote;
444447
CurrentRemote = GetGitRemote(remote.Value);
445-
UpdateRepositoryInfo();
448+
ClearRepositoryInfo();
446449
}
447450
}) { Affinity = TaskAffinity.UI }.Start();
448451
}
@@ -485,20 +488,10 @@ private void UpdateLocalBranches()
485488
LocalBranches = LocalConfigBranches.Values.Select(GetLocalGitBranch).ToArray();
486489
}
487490

488-
private void UpdateRepositoryInfo()
491+
private void ClearRepositoryInfo()
489492
{
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-
}
493+
CloneUrl = null;
494+
Name = null;
502495
}
503496

504497
private void RepositoryManager_OnLocalBranchRemoved(string name)

0 commit comments

Comments
 (0)