From c1be170c86dcf6f937abf9f2fae68bb67bf39f9f Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:40:41 +0000 Subject: [PATCH] remove unused code --- dist/index.js | 10 ---------- src/create-or-update-branch.ts | 10 ---------- src/git-command-manager.ts | 9 --------- 3 files changed, 29 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4d35c58..cf89cf2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -746,16 +746,6 @@ class GitCommandManager { return output.exitCode === 1; }); } - getChangedFiles(options) { - return __awaiter(this, void 0, void 0, function* () { - const args = ['diff', '--name-only']; - if (options) { - args.push(...options); - } - const output = yield this.exec(args); - return output.stdout.split('\n').filter(filename => filename != ''); - }); - } isDirty(untracked, pathspec) { return __awaiter(this, void 0, void 0, function* () { const pathspecArgs = pathspec ? ['--', ...pathspec] : []; diff --git a/src/create-or-update-branch.ts b/src/create-or-update-branch.ts index 0740dc2..5e82b01 100644 --- a/src/create-or-update-branch.ts +++ b/src/create-or-update-branch.ts @@ -128,16 +128,6 @@ function splitLines(multilineString: string): string[] { .filter(x => x !== '') } -export interface BranchFileChanges { - additions: { - path: string - contents: string - }[] - deletions: { - path: string - }[] -} - interface CreateOrUpdateBranchResult { action: string base: string diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index c23b46f..f9f00b8 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -216,15 +216,6 @@ export class GitCommandManager { return output.exitCode === 1 } - async getChangedFiles(options?: string[]): Promise { - const args = ['diff', '--name-only'] - if (options) { - args.push(...options) - } - const output = await this.exec(args) - return output.stdout.split('\n').filter(filename => filename != '') - } - async isDirty(untracked: boolean, pathspec?: string[]): Promise { const pathspecArgs = pathspec ? ['--', ...pathspec] : [] // Check untracked changes