Skip to content

Commit d421372

Browse files
authored
Git - add the ability to create worktree from remote branches and tags (microsoft#257461)
1 parent bb404ec commit d421372

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

extensions/git/src/commands.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3402,12 +3402,13 @@ export class CommandCenter {
34023402

34033403
if (!name) {
34043404
const getBranchPicks = async () => {
3405-
const refs = await repository.getRefs({
3406-
pattern: 'refs/heads',
3407-
includeCommitDetails: showRefDetails
3408-
});
3409-
const processors = [new RefProcessor(RefType.Head, BranchItem)];
3410-
const itemsProcessor = new RefItemsProcessor(repository, processors);
3405+
const refs = await repository.getRefs({ includeCommitDetails: showRefDetails });
3406+
const itemsProcessor = new RefItemsProcessor(repository, [
3407+
new RefProcessor(RefType.Head),
3408+
new RefProcessor(RefType.RemoteHead),
3409+
new RefProcessor(RefType.Tag)
3410+
]);
3411+
34113412
return itemsProcessor.processRefs(refs);
34123413
};
34133414

0 commit comments

Comments
 (0)