Skip to content

Commit e916511

Browse files
committed
rename deleteBranch to deleteBranches
1 parent de76876 commit e916511

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/commands/git/branch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ export class BranchGitCommand extends QuickCommand {
532532
endSteps(state);
533533

534534
try {
535-
await state.repo.git.deleteBranch(state.references, {
535+
await state.repo.git.deleteBranches(state.references, {
536536
force: state.flags.includes('--force'),
537537
remote: state.flags.includes('--remotes'),
538538
});

src/env/node/git/localGitProvider.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
12741274
}
12751275

12761276
@log()
1277-
async deleteBranch(
1277+
async deleteBranches(
12781278
repoPath: string,
12791279
branches: GitBranchReference[],
12801280
options: { force?: boolean; remote?: boolean },
@@ -1307,7 +1307,6 @@ export class LocalGitProvider implements GitProvider, Disposable {
13071307
}
13081308
}
13091309

1310-
const remoteBranches = branches.filter((b: GitBranchReference) => b.remote);
13111310
if (remoteBranches.length !== 0) {
13121311
const branchesByOrigin = groupByMap(remoteBranches, b => getRemoteNameFromBranchName(b.name));
13131312

src/git/gitProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export interface BranchContributorOverview {
120120
export interface GitProviderRepository {
121121
createBranch?(repoPath: string, name: string, ref: string): Promise<void>;
122122
renameBranch?(repoPath: string, oldName: string, newName: string): Promise<void>;
123-
deleteBranch?(
123+
deleteBranches?(
124124
repoPath: string,
125125
branches: GitBranchReference | GitBranchReference[],
126126
options?: { force?: boolean; remote?: boolean },

src/git/gitProviderService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,19 +1378,19 @@ export class GitProviderService implements Disposable {
13781378
}
13791379

13801380
@log()
1381-
deleteBranch(
1381+
deleteBranches(
13821382
repoPath: string,
13831383
branches: GitBranchReference | GitBranchReference[],
13841384
options?: { force?: boolean; remote?: boolean },
13851385
): Promise<void> {
13861386
const { provider, path } = this.getProvider(repoPath);
1387-
if (provider.deleteBranch == null) throw new ProviderNotSupportedError(provider.descriptor.name);
1387+
if (provider.deleteBranches == null) throw new ProviderNotSupportedError(provider.descriptor.name);
13881388

13891389
if (!Array.isArray(branches)) {
13901390
branches = [branches];
13911391
}
13921392

1393-
return provider.deleteBranch(path, branches, {
1393+
return provider.deleteBranches(path, branches, {
13941394
force: options?.force,
13951395
remote: options?.remote,
13961396
});

0 commit comments

Comments
 (0)