Skip to content

Commit 7ad5c2d

Browse files
committed
rename deleteBranch to deleteBranches
1 parent 8966441 commit 7ad5c2d

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
@@ -546,7 +546,7 @@ export class BranchGitCommand extends QuickCommand {
546546
endSteps(state);
547547

548548
try {
549-
await state.repo.git.deleteBranch(state.references, {
549+
await state.repo.git.deleteBranches(state.references, {
550550
force: state.flags.includes('--force'),
551551
remote: state.flags.includes('--remotes'),
552552
});

src/env/node/git/localGitProvider.ts

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

12771277
@log()
1278-
async deleteBranch(
1278+
async deleteBranches(
12791279
repoPath: string,
12801280
branches: GitBranchReference[],
12811281
options: { force?: boolean; remote?: boolean },
@@ -1308,7 +1308,6 @@ export class LocalGitProvider implements GitProvider, Disposable {
13081308
}
13091309
}
13101310

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

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)