Skip to content

Commit dc08c79

Browse files
authored
Branch does not exist locally popup (and it doesn't go away) (#7855)
Fixes #7687
1 parent 8bb9fd8 commit dc08c79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/github/createPRViewProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,10 +1303,12 @@ export class CreatePullRequestViewProvider extends BaseCreatePullRequestViewProv
13031303
} else {
13041304
try {
13051305
compareBranch = await this._folderRepositoryManager.repository.getBranch(newBranch);
1306-
await this.model.setCompareBranch(newBranch);
13071306
} catch (e) {
13081307
vscode.window.showErrorMessage(vscode.l10n.t('Branch does not exist locally.'));
13091308
}
1309+
if (compareBranch) {
1310+
await this.model.setCompareBranch(newBranch);
1311+
}
13101312
}
13111313

13121314
compareBranch = compareBranch ?? await this._folderRepositoryManager.repository.getBranch(this.model.compareBranch);

0 commit comments

Comments
 (0)