Skip to content

Commit ecaa38d

Browse files
nhortonclaude
andcommitted
fix: shared_jobs sparse checkout excludes nix flake files
Use --no-checkout + --no-cone mode so that only library/jobs/** is checked out, preventing root-level files like flake.nix and flake.lock from being materialized in the sparse clone. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent db01ca6 commit ecaa38d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/deepwork/standard_jobs/deepwork_jobs/sync_shared_jobs.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ If the user selects "Custom local path", ask for the filesystem path to the Deep
8282

8383
1. If `.deepwork/upstream/` doesn't exist, create it:
8484
```bash
85-
git clone --sparse --filter=blob:none \
85+
git clone --no-checkout --filter=blob:none \
8686
https://github.com/Unsupervisedcom/deepwork.git \
8787
.deepwork/upstream
88-
git -C .deepwork/upstream sparse-checkout set --cone library/jobs/
88+
git -C .deepwork/upstream sparse-checkout set --no-cone 'library/jobs/**'
89+
git -C .deepwork/upstream checkout
8990
```
9091
2. If it already exists, update it:
9192
```bash
@@ -124,10 +125,11 @@ The env var must be set so the DeepWork plugin discovers library jobs at runtime
124125
```bash
125126
REPO_ROOT="$(git rev-parse --show-toplevel)"
126127
if [ ! -d "$REPO_ROOT/.deepwork/upstream" ]; then
127-
git clone --sparse --filter=blob:none \
128+
git clone --no-checkout --filter=blob:none \
128129
https://github.com/Unsupervisedcom/deepwork.git \
129130
"$REPO_ROOT/.deepwork/upstream"
130-
git -C "$REPO_ROOT/.deepwork/upstream" sparse-checkout set --cone library/jobs/
131+
git -C "$REPO_ROOT/.deepwork/upstream" sparse-checkout set --no-cone 'library/jobs/**'
132+
git -C "$REPO_ROOT/.deepwork/upstream" checkout
131133
else
132134
git -C "$REPO_ROOT/.deepwork/upstream" pull --ff-only
133135
fi

0 commit comments

Comments
 (0)