Git - catch exceptions while fast-forwarding a branch (#164128)

Fixes #163685
This commit is contained in:
Ladislau Szomoru
2022-10-20 13:30:10 +02:00
committed by GitHub
parent 25f0749539
commit c139361a3c
+6 -1
View File
@@ -40,7 +40,12 @@ class CheckoutItem implements QuickPickItem {
const pullBeforeCheckout = config.get<boolean>('pullBeforeCheckout', false) === true;
if (pullBeforeCheckout) {
await this.repository.fastForwardBranch(this.ref.name!);
try {
await this.repository.fastForwardBranch(this.ref.name!);
}
catch (err) {
// noop
}
}
await this.repository.checkout(this.ref.name, opts);