summaryrefslogtreecommitdiff
path: root/internal/executor/claude.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/executor/claude.go')
-rw-r--r--internal/executor/claude.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/executor/claude.go b/internal/executor/claude.go
index 683de87..d8032ab 100644
--- a/internal/executor/claude.go
+++ b/internal/executor/claude.go
@@ -204,7 +204,10 @@ func teardownSandbox(projectDir, sandboxDir string, logger *slog.Logger) error {
}
// Fetch new commits from sandbox into project_dir and fast-forward merge.
- if out, err := exec.Command("git", "-C", projectDir, "fetch", sandboxDir, "HEAD").CombinedOutput(); err != nil {
+ // Use file:// prefix to force pack-protocol transfer instead of the local
+ // optimization that hard-links objects — hard-linking fails across devices
+ // and can fail with permission errors when the repo has mixed-owner objects.
+ if out, err := exec.Command("git", "-C", projectDir, "fetch", "file://"+sandboxDir, "HEAD").CombinedOutput(); err != nil {
return fmt.Errorf("git fetch from sandbox: %w\n%s", err, out)
}
if out, err := exec.Command("git", "-C", projectDir, "merge", "--ff-only", "FETCH_HEAD").CombinedOutput(); err != nil {