Skip to content

Commit 2f10858

Browse files
committed
rename deleteBranch to deleteBranches
1 parent c01aec5 commit 2f10858

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
@@ -523,7 +523,7 @@ export class BranchGitCommand extends QuickCommand {
523523
endSteps(state);
524524

525525
try {
526-
await state.repo.git.deleteBranch(state.references, {
526+
await state.repo.git.deleteBranches(state.references, {
527527
force: state.flags.includes('--force'),
528528
remote: state.flags.includes('--remotes'),
529529
});

src/env/node/git/localGitProvider.ts

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

12531253
@log()
1254-
async deleteBranch(
1254+
async deleteBranches(
12551255
repoPath: string,
12561256
branches: GitBranchReference[],
12571257
options: { force?: boolean; remote?: boolean },
@@ -1284,7 +1284,6 @@ export class LocalGitProvider implements GitProvider, Disposable {
12841284
}
12851285
}
12861286

1287-
const remoteBranches = branches.filter((b: GitBranchReference) => b.remote);
12881287
if (remoteBranches.length !== 0) {
12891288
const branchesByOrigin = groupByMap(remoteBranches, b => getRemoteNameFromBranchName(b.name));
12901289

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
@@ -1358,19 +1358,19 @@ export class GitProviderService implements Disposable {
13581358
}
13591359

13601360
@log()
1361-
deleteBranch(
1361+
deleteBranches(
13621362
repoPath: string,
13631363
branches: GitBranchReference | GitBranchReference[],
13641364
options?: { force?: boolean; remote?: boolean },
13651365
): Promise<void> {
13661366
const { provider, path } = this.getProvider(repoPath);
1367-
if (provider.deleteBranch == null) throw new ProviderNotSupportedError(provider.descriptor.name);
1367+
if (provider.deleteBranches == null) throw new ProviderNotSupportedError(provider.descriptor.name);
13681368

13691369
if (!Array.isArray(branches)) {
13701370
branches = [branches];
13711371
}
13721372

1373-
return provider.deleteBranch(path, branches, {
1373+
return provider.deleteBranches(path, branches, {
13741374
force: options?.force,
13751375
remote: options?.remote,
13761376
});

0 commit comments

Comments
 (0)