Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions extensions/git/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class RefItem implements QuickPickItem {
constructor(protected readonly ref: Ref) { }
}

class CheckoutItem extends RefItem {
class BranchItem extends RefItem {
override get description(): string {
const description: string[] = [];

Expand All @@ -125,7 +125,9 @@ class CheckoutItem extends RefItem {
constructor(override readonly ref: Branch) {
super(ref);
}
}

class CheckoutItem extends BranchItem {
async run(repository: Repository, opts?: { detached?: boolean }): Promise<void> {
if (!this.ref.name) {
return;
Expand All @@ -144,7 +146,6 @@ class CheckoutProtectedItem extends CheckoutItem {
override get label(): string {
return `$(lock) ${this.ref.name ?? this.shortCommit}`;
}

}

class CheckoutRemoteHeadItem extends RefItem {
Expand Down Expand Up @@ -180,7 +181,7 @@ class CheckoutTagItem extends RefItem {
}
}

class BranchDeleteItem extends RefItem {
class BranchDeleteItem extends BranchItem {

async run(repository: Repository, force?: boolean): Promise<void> {
if (this.ref.type === RefType.Head && this.refName) {
Expand Down Expand Up @@ -214,7 +215,7 @@ class RemoteTagDeleteItem extends RefItem {
}
}

class MergeItem extends RefItem {
class MergeItem extends BranchItem {

async run(repository: Repository): Promise<void> {
if (this.ref.name || this.ref.commit) {
Expand All @@ -223,7 +224,7 @@ class MergeItem extends RefItem {
}
}

class RebaseItem extends RefItem {
class RebaseItem extends BranchItem {

async run(repository: Repository): Promise<void> {
if (this.ref?.name) {
Expand Down
Loading