Skip to content

Commit 526d20a

Browse files
committed
Removes unused getLog call from generateRebase
1 parent afe5854 commit 526d20a

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/plus/ai/aiProviderService.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -882,15 +882,8 @@ export class AIProviderService implements Disposable {
882882
const rq = await this.sendRequest(
883883
'generate-rebase',
884884
async (model, reporting, cancellation, maxInputTokens, retries) => {
885-
const [diffResult, logResult] = await Promise.allSettled([
886-
repo.git.diff.getDiff?.(headRef, baseRef, { notation: '...' }),
887-
repo.git.commits.getLog(`${baseRef}..${headRef}`),
888-
]);
889-
890-
const diff = getSettledValue(diffResult);
891-
const log = getSettledValue(logResult);
892-
893-
if (!diff?.contents || !log?.commits?.size) {
885+
const diff = await repo.git.diff.getDiff?.(headRef, baseRef, { notation: '...' });
886+
if (!diff?.contents) {
894887
throw new AINoRequestDataError('No changes found to generate a rebase from.');
895888
}
896889
if (cancellation.isCancellationRequested) throw new CancellationError();

0 commit comments

Comments
 (0)