Skip to content

Commit c1f115f

Browse files
Copilotalexr00
andcommitted
Fix wrong file list when creating PR by initializing _compareBranch correctly
The constructor was incorrectly initializing _compareBranch to baseBranch instead of the actual compareBranch parameter. This caused the file diff comparison to potentially use wrong branches before setCompareBranch completed its async initialization, resulting in displaying the wrong list of files when creating a PR. Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent c791455 commit c1f115f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/view/createPullRequestDataModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class CreatePullRequestDataModel extends Disposable {
4545
super();
4646
this._baseOwner = baseOwner;
4747
this._baseBranch = baseBranch;
48-
this._compareBranch = baseBranch;
48+
this._compareBranch = compareBranch;
4949
this._gitcontentProvider = new GitContentProvider(this.folderRepositoryManager);
5050
this._compareGitHubRepository = this.folderRepositoryManager.gitHubRepositories.find(githubRepo => githubRepo.remote.owner === compareOwner && githubRepo.remote.repositoryName === repositoryName);
5151
this._gitHubcontentProvider = new GitHubContentProvider(this.folderRepositoryManager.gitHubRepositories);

0 commit comments

Comments
 (0)