Skip to content

Commit e8ff53b

Browse files
committed
rename deleteBranch to deleteBranches
1 parent 10d0ea9 commit e8ff53b

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
@@ -561,7 +561,7 @@ export class BranchGitCommand extends QuickCommand {
561561
endSteps(state);
562562

563563
try {
564-
await state.repo.git.deleteBranch(state.references, {
564+
await state.repo.git.deleteBranches(state.references, {
565565
force: state.flags.includes('--force'),
566566
remote: state.flags.includes('--remotes'),
567567
});

src/env/node/git/localGitProvider.ts

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

12881288
@log()
1289-
async deleteBranch(
1289+
async deleteBranches(
12901290
repoPath: string,
12911291
branches: GitBranchReference[],
12921292
options: { force?: boolean; remote?: boolean },
@@ -1319,7 +1319,6 @@ export class LocalGitProvider implements GitProvider, Disposable {
13191319
}
13201320
}
13211321

1322-
const remoteBranches = branches.filter((b: GitBranchReference) => b.remote);
13231322
if (remoteBranches.length !== 0) {
13241323
const branchesByOrigin = groupByMap(remoteBranches, b => getRemoteNameFromBranchName(b.name));
13251324

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)