diff --git a/src/git/models/repository.ts b/src/git/models/repository.ts index 75199c3..3441a82 100644 --- a/src/git/models/repository.ts +++ b/src/git/models/repository.ts @@ -199,6 +199,7 @@ export class Repository implements Disposable { } if (uri.path.endsWith('.git/config')) { + this._branch = undefined; this.resetRemotesCache(); this.fireChange(RepositoryChange.Config, RepositoryChange.Remotes); @@ -239,6 +240,7 @@ export class Repository implements Disposable { return; case 'remotes': + this._branch = undefined; this.resetRemotesCache(); this.fireChange(RepositoryChange.Remotes); diff --git a/src/views/branchesView.ts b/src/views/branchesView.ts index 037c3e3..384601c 100644 --- a/src/views/branchesView.ts +++ b/src/views/branchesView.ts @@ -99,7 +99,11 @@ export class BranchesRepositoryNode extends SubscribeableViewNode return; } - if (e.changed(RepositoryChange.Heads)) { + if ( + e.changed(RepositoryChange.Config) || + e.changed(RepositoryChange.Heads) || + e.changed(RepositoryChange.Remotes) + ) { void this.triggerChange(true); if (this.root) { void this.parent?.triggerChange(true); diff --git a/src/views/contributorsView.ts b/src/views/contributorsView.ts index 483b844..1a4794a 100644 --- a/src/views/contributorsView.ts +++ b/src/views/contributorsView.ts @@ -69,7 +69,7 @@ export class ContributorsRepositoryNode extends SubscribeableViewNode { return; } - if (e.changed(RepositoryChange.Index) || e.changed(RepositoryChange.Heads)) { + if ( + e.changed(RepositoryChange.Config) || + e.changed(RepositoryChange.Index) || + e.changed(RepositoryChange.Heads) || + e.changed(RepositoryChange.Remotes) + ) { void this.triggerChange(true); if (this.root) { void this.parent?.triggerChange(true); @@ -153,8 +158,10 @@ export class HistoryViewNode extends ViewNode { const branch = await child.repo.getBranch(); const status = branch?.getTrackingStatus(); - this.view.titleContext = - branch != null ? `${branch.name}${status ? ` ${GlyphChars.Dot} ${status}` : ''}` : undefined; + this.view.title = + branch != null + ? `${branch.name} Branch ${status ? ` ${GlyphChars.Dot} ${status}` : ''}` + : 'Current Branch'; return child.getChildren(); } diff --git a/src/views/remotesView.ts b/src/views/remotesView.ts index 0b88125..cd9ff18 100644 --- a/src/views/remotesView.ts +++ b/src/views/remotesView.ts @@ -96,7 +96,7 @@ export class RemotesRepositoryNode extends SubscribeableViewNode { return; } - if (e.changed(RepositoryChange.Remotes)) { + if (e.changed(RepositoryChange.Config) || e.changed(RepositoryChange.Remotes)) { void this.triggerChange(true); if (this.root) { void this.parent?.triggerChange(true); diff --git a/src/views/stashesView.ts b/src/views/stashesView.ts index 8bb93f4..42745a9 100644 --- a/src/views/stashesView.ts +++ b/src/views/stashesView.ts @@ -69,7 +69,7 @@ export class StashesRepositoryNode extends SubscribeableViewNode { return; } - if (e.changed(RepositoryChange.Heads)) { + if (e.changed(RepositoryChange.Config) || e.changed(RepositoryChange.Heads)) { void this.triggerChange(true); if (this.root) { void this.parent?.triggerChange(true); diff --git a/src/views/tagsView.ts b/src/views/tagsView.ts index 6eeca29..09592f4 100644 --- a/src/views/tagsView.ts +++ b/src/views/tagsView.ts @@ -87,7 +87,7 @@ export class TagsRepositoryNode extends SubscribeableViewNode { return; } - if (e.changed(RepositoryChange.Tags)) { + if (e.changed(RepositoryChange.Config) || e.changed(RepositoryChange.Tags)) { void this.triggerChange(true); if (this.root) { void this.parent?.triggerChange(true);