mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 08:15:56 +01:00
Sessions - update order for setting the default value for the branch picker (#307053)
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
@@ -235,9 +235,9 @@ export class CopilotCLISession extends Disposable implements ISessionData {
|
||||
.filter((name): name is string => !!name)
|
||||
.filter(name => !name.includes(CopilotCLISession.COPILOT_WORKTREE_PATTERN));
|
||||
|
||||
const defaultBranch = branches.find(b => b === repo.state.get().HEAD?.name)
|
||||
?? branches.find(b => b === 'main')
|
||||
const defaultBranch = branches.find(b => b === 'main')
|
||||
?? branches.find(b => b === 'master')
|
||||
?? branches.find(b => b === repo.state.get().HEAD?.name)
|
||||
?? branches[0];
|
||||
|
||||
this._defaultBranch = defaultBranch;
|
||||
|
||||
Reference in New Issue
Block a user