Skip to content

Commit 9d52792

Browse files
committed
rename deleteBranch to deleteBranches
1 parent 543ae49 commit 9d52792

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
@@ -1272,7 +1272,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
12721272
}
12731273

12741274
@log()
1275-
async deleteBranch(
1275+
async deleteBranches(
12761276
repoPath: string,
12771277
branches: GitBranchReference[],
12781278
options: { force?: boolean; remote?: boolean },
@@ -1305,7 +1305,6 @@ export class LocalGitProvider implements GitProvider, Disposable {
13051305
}
13061306
}
13071307

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

src/git/gitProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export interface RepositoryVisibilityInfo {
115115
export interface GitProviderRepository {
116116
createBranch?(repoPath: string, name: string, ref: string): Promise<void>;
117117
renameBranch?(repoPath: string, oldName: string, newName: string): Promise<void>;
118-
deleteBranch?(
118+
deleteBranches?(
119119
repoPath: string,
120120
branches: GitBranchReference | GitBranchReference[],
121121
options?: { force?: boolean; remote?: boolean },

src/git/gitProviderService.ts

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

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

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

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

0 commit comments

Comments
 (0)