Change:
Testing I can't choose to publish and ask again next time: <img width="264" alt="image" src="https://user-"
Also: The text doesn't indicate that the Always/Never choice only applies to the current workspace folder (as I just discovered) and not to all repositories.
+1, I was about to file the same issue.
Great feedback, this leads me to think we should just have 'Yes' and 'Cancel' as the options here, because choosing 'Never' will break the Continue On flow (i.e. it's not an option that we can actually support, and per we should actually throw a and bail out of the whole flow here).
'Publish Branch' might be clearer than 'Yes'. The PR extension uses this dialog: <img width="261" alt="image" src="https://user-"
The "fix" for this is more problematic for me. I used to have this in my settings: Now every time I quit VS Code (I'm on Mac if it makes a difference), I see the dialog and I have to press "Cancel". Even worse, pressing "Cancel" seems to only close the dialog and reopen it again. can we reopen this issue and restore the setting at least? That'd be highly appreciated. Thanks.

Discussion:
"default": "prompt", "markdownDescription": "%config.openRepositoryInParentFolders%", "scope": "resource" <del> }, "git.publishBeforeContinueOn": { "type": "string", "enum": [ "prompt", "always", "never" ], "markdownEnumDescriptions": [ "%config.publishBeforeContinueOn.prompt%", "%config.publishBeforeContinueOn.always%", "%config.publishBeforeContinueOn.never%" ], "default": "prompt", "markdownDescription": "%config.publishBeforeContinueOn%", "scope": "resource", "tags": [ "experimental" ] </del> } } },

this.providerRegistration = vscode.workspace.registerEditSessionIdentityProvider('file', this); vscode.workspace.onWillCreateEditSessionIdentity((e) => { <del> const publishBeforeContinueOn = vscode.workspace.getConfiguration('git').get<'never' | 'always' | 'prompt'>('publishBeforeContinueOn', 'prompt'); if (publishBeforeContinueOn !== 'never') { e.waitUntil(this._onWillCreateEditSessionIdentity(e.workspaceFolder, e.token, publishBeforeContinueOn)); } </del> <ins> e.waitUntil(this._onWillCreateEditSessionIdentity(e.workspaceFolder)); </ins> }); }

} } <del> private async _onWillCreateEditSessionIdentity(workspaceFolder: vscode.WorkspaceFolder, cancellationToken: vscode.CancellationToken, publishBeforeContinueOn: 'always' | 'prompt'): Promise<void> { const cancellationPromise = createCancellationPromise(cancellationToken); await Promise.race([this._doPublish(workspaceFolder, publishBeforeContinueOn), cancellationPromise]); </del> <ins> private async _onWillCreateEditSessionIdentity(workspaceFolder: vscode.WorkspaceFolder): Promise<void> { await this._doPublish(workspaceFolder); </ins> } <del> private async _doPublish(workspaceFolder: vscode.WorkspaceFolder, publishBeforeContinueOn: 'always' | 'prompt') { </del> <ins> private async _doPublish(workspaceFolder: vscode.WorkspaceFolder) { </ins> await this.model.openRepository(path.dirname(workspaceFolder.uri.fsPath)); const repository = this.model.getRepository(workspaceFolder.uri);

// ensure that it is published before Continue On is invoked if (!repository.HEAD?.upstream && repository.HEAD?.type === RefType.Head) { <del> if (publishBeforeContinueOn === 'prompt') { const always = vscode.l10n.t('Always'); const never = vscode.l10n.t('Never'); const selection = await vscode.window.showInformationMessage( vscode.l10n.t('The current branch is not published to the remote. Would you like to publish it to access your changes elsewhere?'), { modal: true }, ...[always, never] ); switch (selection) { case always: vscode.workspace.getConfiguration('git').update('publishBeforeContinueOn', 'always'); break; case never: vscode.workspace.getConfiguration('git').update('publishBeforeContinueOn', 'never'); default: return; } </del> <ins> const publishBranch = vscode.l10n.t('Publish Branch'); const selection = await vscode.window.showInformationMessage( vscode.l10n.t('The current branch is not published to the remote. Would you like to publish it to access your changes elsewhere?'), { modal: true }, publishBranch ); if (selection !== publishBranch) { throw new vscode.CancellationError(); </ins> } <del> await vscode.window.withProgress({ location: vscode.ProgressLocation.Notification, title: vscode.l10n.t('Publishing branch...') }, async () => { await vscode.commands.executeCommand('git.publish'); }); </del> <ins> await vscode.commands.executeCommand('git.publish'); </ins> } } }

sha }; } <del> function createCancellationPromise(cancellationToken: vscode.CancellationToken) { return new Promise((resolve, _) => { if (cancellationToken.isCancellationRequested) { resolve(undefined); } cancellationToken.onCancellationRequested(() => { resolve(undefined); }); }); } </del>

} async onWillCreateEditSessionIdentity(workspaceFolder: IWorkspaceFolder, cancellationToken: CancellationToken): Promise<void> { <ins> this._logService.debug('Running onWillCreateEditSessionIdentity participants...'); // TODO@joyceerhl show progress notification? </ins> for (const participant of this._participants) { await participant.participate(workspaceFolder, cancellationToken); } <ins> this._logService.debug(`Done running ${this._participants.length} onWillCreateEditSessionIdentity participants.`); </ins> } private _participants: IEditSessionIdentityCreateParticipant[] = [];