Skip to content

Commit 2f4e653

Browse files
author
Sander Ronde
committed
Don't show error when submitting multiple patches for review
1 parent 38d50f2 commit 2f4e653

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/lib/git/git.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ export async function gitReview(gerritRepo: Repository): Promise<void> {
394394
stdout: string;
395395
handled: boolean;
396396
}>((resolve) => {
397-
let ignoreInitialResult = false;
398397
void execAndMonitor(
399398
'git-review',
400399
async (stdout, proc) => {
@@ -403,10 +402,13 @@ export async function gitReview(gerritRepo: Repository): Promise<void> {
403402
'You are about to submit multiple commits.'
404403
)
405404
) {
406-
return;
405+
return resolve({
406+
success: true,
407+
stdout: '',
408+
handled: true,
409+
});
407410
}
408411

409-
ignoreInitialResult = true;
410412
proc.kill();
411413
const YES_OPTION = 'Yes';
412414
const CANCEL_OPTION = 'Cancel';
@@ -440,7 +442,7 @@ export async function gitReview(gerritRepo: Repository): Promise<void> {
440442
args: config.get('gerrit.pushForReviewArgs', []),
441443
}
442444
).then(({ success, stdout }) => {
443-
if (success && !ignoreInitialResult) {
445+
if (success) {
444446
resolve({
445447
success: true,
446448
handled: true,

0 commit comments

Comments
 (0)