@@ -3327,13 +3327,15 @@ export class AppStore extends TypedBaseStore<IAppState> {
33273327 const isStashedChangesVisible =
33283328 changesState . selection . kind === ChangesSelectionKind . Stash
33293329
3330+ const askForConfirmationWhenStashingAllChanges = false
3331+
33303332 updatePreferredAppMenuItemLabels ( {
33313333 ...labels ,
33323334 contributionTargetDefaultBranch,
33333335 isForcePushForCurrentRepository,
33343336 isStashedChangesVisible,
33353337 hasCurrentPullRequest : currentPullRequest !== null ,
3336- askForConfirmationWhenStashingAllChanges : false ,
3338+ askForConfirmationWhenStashingAllChanges,
33373339 } )
33383340 }
33393341
@@ -4582,10 +4584,10 @@ export class AppStore extends TypedBaseStore<IAppState> {
45824584 /**
45834585 * Update the repository sidebar indicator for the repository
45844586 */
4585- private updateSidebarIndicator (
4587+ private async updateSidebarIndicator (
45864588 repository : Repository ,
45874589 status : IStatusResult | null
4588- ) : void {
4590+ ) : Promise < void > {
45894591 const lookup = this . localRepositoryStateLookup
45904592
45914593 if ( repository . missing ) {
@@ -5378,7 +5380,6 @@ export class AppStore extends TypedBaseStore<IAppState> {
53785380 }
53795381
53805382 const { account, owner, name } = match
5381-
53825383 const { endpoint } = account
53835384 const api = API . fromAccount ( account )
53845385 const apiRepo = await api . fetchRepository ( owner , name )
@@ -5495,69 +5496,6 @@ export class AppStore extends TypedBaseStore<IAppState> {
54955496 return this . repositoriesStore . updateRepositoryAlias ( repository , newAlias )
54965497 }
54975498
5498- /** This shouldn't be called directly. See `Dispatcher`. */
5499- public async _changeRepositoryGroupName (
5500- repository : Repository ,
5501- newGroupName : string | null
5502- ) : Promise < void > {
5503- const mainPath = normalizePath (
5504- repository . isLinkedWorktree
5505- ? repository . mainWorktreePath
5506- : repository . path
5507- )
5508- const reposToUpdate = this . repositories . filter (
5509- r =>
5510- normalizePath ( r . path ) === mainPath ||
5511- ( r . isLinkedWorktree && normalizePath ( r . mainWorktreePath ) === mainPath )
5512- )
5513- return this . repositoriesStore . updateRepositoryGroupName (
5514- reposToUpdate ,
5515- newGroupName
5516- )
5517- }
5518-
5519- /** This shouldn't be called directly. See `Dispatcher`. */
5520- public async _updateRepositoryDefaultBranch (
5521- repository : Repository ,
5522- defaultBranch : string | null
5523- ) : Promise < void > {
5524- const repo = await this . repositoriesStore . updateRepositoryDefaultBranch (
5525- repository ,
5526- defaultBranch
5527- )
5528- await this . _refreshRepository ( repo )
5529- }
5530-
5531- /** This shouldn't be called directly. See `Dispatcher`. */
5532- public async _updateRepositoryAccount (
5533- repository : Repository ,
5534- account : Account | null
5535- ) : Promise < void > {
5536- if ( repository . gitHubRepository && account === null ) {
5537- await this . repositoriesStore . clearGitHubRepositoryLogin (
5538- repository . gitHubRepository
5539- )
5540- }
5541- const repo = await this . repositoriesStore . updateRepositoryAccount (
5542- repository ,
5543- account
5544- )
5545- const refreshedRepo = await this . repositoryWithRefreshedGitHubRepository (
5546- repo
5547- )
5548- await this . _refreshRepository ( refreshedRepo )
5549- }
5550-
5551- public async _updateRepositoryEditorOverride (
5552- repository : Repository ,
5553- customEditorOverride : EditorOverride | null
5554- ) : Promise < void > {
5555- await this . repositoriesStore . updateRepositoryEditorOverride (
5556- repository ,
5557- customEditorOverride
5558- )
5559- }
5560-
55615499 /** This shouldn't be called directly. See `Dispatcher`. */
55625500 public async _renameBranch (
55635501 repository : Repository ,
@@ -5744,6 +5682,69 @@ export class AppStore extends TypedBaseStore<IAppState> {
57445682 return branchToCheckout
57455683 }
57465684
5685+ /** This shouldn't be called directly. See `Dispatcher`. */
5686+ public async _changeRepositoryGroupName (
5687+ repository : Repository ,
5688+ newGroupName : string | null
5689+ ) : Promise < void > {
5690+ const mainPath = normalizePath (
5691+ repository . isLinkedWorktree
5692+ ? repository . mainWorktreePath
5693+ : repository . path
5694+ )
5695+ const reposToUpdate = this . repositories . filter (
5696+ r =>
5697+ normalizePath ( r . path ) === mainPath ||
5698+ ( r . isLinkedWorktree && normalizePath ( r . mainWorktreePath ) === mainPath )
5699+ )
5700+ return this . repositoriesStore . updateRepositoryGroupName (
5701+ reposToUpdate ,
5702+ newGroupName
5703+ )
5704+ }
5705+
5706+ /** This shouldn't be called directly. See `Dispatcher`. */
5707+ public async _updateRepositoryDefaultBranch (
5708+ repository : Repository ,
5709+ defaultBranch : string | null
5710+ ) : Promise < void > {
5711+ const repo = await this . repositoriesStore . updateRepositoryDefaultBranch (
5712+ repository ,
5713+ defaultBranch
5714+ )
5715+ await this . _refreshRepository ( repo )
5716+ }
5717+
5718+ /** This shouldn't be called directly. See `Dispatcher`. */
5719+ public async _updateRepositoryAccount (
5720+ repository : Repository ,
5721+ account : Account | null
5722+ ) : Promise < void > {
5723+ if ( repository . gitHubRepository && account === null ) {
5724+ await this . repositoriesStore . clearGitHubRepositoryLogin (
5725+ repository . gitHubRepository
5726+ )
5727+ }
5728+ const repo = await this . repositoriesStore . updateRepositoryAccount (
5729+ repository ,
5730+ account
5731+ )
5732+ const refreshedRepo = await this . repositoryWithRefreshedGitHubRepository (
5733+ repo
5734+ )
5735+ await this . _refreshRepository ( refreshedRepo )
5736+ }
5737+
5738+ public async _updateRepositoryEditorOverride (
5739+ repository : Repository ,
5740+ customEditorOverride : EditorOverride | null
5741+ ) : Promise < void > {
5742+ await this . repositoriesStore . updateRepositoryEditorOverride (
5743+ repository ,
5744+ customEditorOverride
5745+ )
5746+ }
5747+
57475748 private updatePushPullFetchProgress (
57485749 repository : Repository ,
57495750 pushPullFetchProgress : Progress | null
0 commit comments