Skip to content

Commit

Permalink
Fixes bitbucket issue with #1447
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Apr 6, 2021
1 parent 3479275 commit 0e2d4d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/quickpicks/remoteProviderPicker.ts
Expand Up @@ -70,12 +70,12 @@ export class CopyOrOpenRemoteCommandQuickPickItem extends CommandQuickPickItem {
const { branchOrTag } = resource;
const branchesOrTags = await Container.git.getBranchesAndOrTags(this.remote.repoPath, {
filter: {
branches: b => b.name === branchOrTag,
branches: b => b.name === branchOrTag || GitBranch.getNameWithoutRemote(b.name) === branchOrTag,
tags: b => b.name === branchOrTag,
},
});

const sha = branchesOrTags?.[0].sha;
const sha = branchesOrTags?.[0]?.sha;
if (sha) {
resource = { ...resource, type: RemoteResourceType.Revision, sha: sha };
}
Expand Down Expand Up @@ -176,7 +176,7 @@ export namespace RemoteProviderPicker {
items = [new ConfigureCustomRemoteProviderCommandQuickPickItem()];
placeHolder = 'No auto-detected or configured remote providers found';
} else {
if (autoPick === 'default') {
if (autoPick === 'default' && remotes.length > 1) {
// If there is a default just execute it directly
const remote = remotes.find(r => r.default);
if (remote != null) {
Expand Down

0 comments on commit 0e2d4d0

Please sign in to comment.