Skip to content

Fix environment creation from shallow clones#347

Open
cyq1017 wants to merge 1 commit into
dagger:mainfrom
cyq1017:codex/fix-issue-248-shallow-unshallow
Open

Fix environment creation from shallow clones#347
cyq1017 wants to merge 1 commit into
dagger:mainfrom
cyq1017:codex/fix-issue-248-shallow-unshallow

Conversation

@cyq1017
Copy link
Copy Markdown

@cyq1017 cyq1017 commented May 24, 2026

Summary

  • detect shallow repositories before creating an environment worktree branch
  • fetch full history only when the source repo is shallow
  • add a regression test that reproduces the shallow-clone push failure path

Fixes #248.

Tests

  • go test ./repository -run TestInitializeWorktreeUnshallowOnShallowClone
  • go test -short ./...
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: container-use environment_create fails with shallow Git repositories due to rejected push

1 participant