Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,14 @@ class GitCommandManager {
else {
args.push(ref);
}
yield this.execGit(args);
// Retry checkout because it can trigger network I/O when using partial
// clones (filter=blob:none). In that mode git lazily fetches missing
// blobs from the promisor remote during checkout, so a transient network
// failure would otherwise surface as a hard error here.
const that = this;
yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
yield that.execGit(args);
}));
});
}
checkoutDetach() {
Expand Down Expand Up @@ -990,7 +997,10 @@ class GitCommandManager {
if (recursive) {
args.push('--recursive');
}
yield this.execGit(args);
const that = this;
yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
yield that.execGit(args);
}));
});
}
submoduleStatus() {
Expand Down
14 changes: 12 additions & 2 deletions src/git-command-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,14 @@ class GitCommandManager {
args.push(ref)
}

await this.execGit(args)
// Retry checkout because it can trigger network I/O when using partial
// clones (filter=blob:none). In that mode git lazily fetches missing
// blobs from the promisor remote during checkout, so a transient network
// failure would otherwise surface as a hard error here.
const that = this
await retryHelper.execute(async () => {
await that.execGit(args)
})
}

async checkoutDetach(): Promise<void> {
Expand Down Expand Up @@ -457,7 +464,10 @@ class GitCommandManager {
args.push('--recursive')
}

await this.execGit(args)
const that = this
await retryHelper.execute(async () => {
await that.execGit(args)
})
}

async submoduleStatus(): Promise<boolean> {
Expand Down