Skip to content

Commit 75244c3

Browse files
committed
rename deleteBranch to deleteBranches
1 parent 1eeaf0b commit 75244c3

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
@@ -519,7 +519,7 @@ export class BranchGitCommand extends QuickCommand {
519519
endSteps(state);
520520

521521
try {
522-
await state.repo.git.deleteBranch(state.references, {
522+
await state.repo.git.deleteBranches(state.references, {
523523
force: state.flags.includes('--force'),
524524
remote: state.flags.includes('--remotes'),
525525
});

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
@@ -1355,19 +1355,19 @@ export class GitProviderService implements Disposable {
13551355
}
13561356

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

13661366
if (!Array.isArray(branches)) {
13671367
branches = [branches];
13681368
}
13691369

1370-
return provider.deleteBranch(path, branches, {
1370+
return provider.deleteBranches(path, branches, {
13711371
force: options?.force,
13721372
remote: options?.remote,
13731373
});

0 commit comments

Comments
 (0)