Skip to content

Commit 95467e3

Browse files
committed
🤖 fix: prune stale refs when importing ssh bundles
1 parent 97e7215 commit 95467e3

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/node/runtime/SSHRuntime.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ describe("SSHRuntime bundle sync reuse", () => {
397397
return Promise.resolve({ stdout: "", stderr: "", exitCode: 0, duration: 0 });
398398
}
399399
if (command.includes(" fetch ")) {
400+
expect(command).toContain("fetch --prune --prune-tags");
400401
expect(command).toContain(bundleFileName);
401402
return Promise.resolve({ stdout: "", stderr: "", exitCode: 0, duration: 0 });
402403
}

src/node/runtime/SSHRuntime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ export class SSHRuntime extends RemoteRuntime {
14381438
initLogger.logStep("Importing bundle into shared base repository...");
14391439
const fetchResult = await execBuffered(
14401440
this,
1441-
`git -C ${baseRepoPathArg} fetch ${remoteBundlePathArg} '+refs/heads/*:${BUNDLE_REF_PREFIX}*' '+refs/tags/*:refs/tags/*'`,
1441+
`git -C ${baseRepoPathArg} fetch --prune --prune-tags ${remoteBundlePathArg} '+refs/heads/*:${BUNDLE_REF_PREFIX}*' '+refs/tags/*:refs/tags/*'`,
14421442
{ cwd: "/tmp", timeout: 300, abortSignal: sharedAbortSignal }
14431443
);
14441444
if (fetchResult.exitCode !== 0) {

0 commit comments

Comments
 (0)