You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* updates/fixes opus 4.6
* AGENTS.md
* update from fixes
* update ignore
* .git/cross to .cross/
* updates .cross dir
* fixes - addressed by pr
---------
Co-authored-by: Test Runner <test@runner.local>
Co-authored-by: Test User <test@example.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Fixed
11
+
-**P0: Sparse checkout broken on newer Git versions** - `git sparse-checkout set <path>` in `--no-cone` mode no longer reliably checks out directories without trailing `/`. Fixed across all three implementations (Go, Rust, Justfile.cross) by appending `/` to sparse-checkout patterns and using `git read-tree -mu HEAD` instead of bare `git checkout` (which can no-op after `--no-checkout`).
12
+
-**P0: Go build "inconsistent vendoring" in CI** - Tests that build the Go binary now remove stale `vendor/` directory and pass `-mod=mod` as a direct flag. Added `src-go/vendor/` to `.gitignore` to prevent accidental commits.
13
+
-**test/014_remove.sh robustness** - Go binary is now reused if already built; gracefully skips Go tests when Go toolchain is unavailable.
14
+
15
+
### Added
16
+
-**AI-assisted coding / sandbox workflow documentation** - New README section explaining how git-cross integrates with AI coding tools and container-based development sandboxes (`sbx`, Docker sandbox). Covers subfolder scoping, `Crossfile` reproducibility, and bidirectional sync.
17
+
-**test/018_sbx_sandbox.sh** - End-to-end test for the AI sandbox workflow: vendor setup, sandbox isolation (no `.git`), AI file modifications, diff review, upstream push, Crossfile replay, and sync.
18
+
19
+
## [0.3.0] - 2026-03-28
20
+
21
+
### Added
22
+
-**Context-aware `cross diff`** - Auto-detects current patch from CWD when no path argument given
23
+
- From inside `vendor/lib`: shows only that patch's diff
24
+
- From repo root: shows all diffs (Go/Rust) or requires explicit path (Just/Shell)
25
+
- From subdirectory of a patch: resolves to parent patch
26
+
- Implemented across all three implementations (Just, Go, Rust)
27
+
- New test `test/016_diff_context.sh` with 7 scenarios
28
+
-**Expanded test coverage** for Go and Rust CLIs
29
+
-`diff`, `replay`, `remove`, `prune` commands now tested in `test/008_rust_cli.sh` and `test/009_go_cli.sh`
30
+
- Output assertions for `list` and `status` commands
31
+
- Re-enabled `test/006_push.sh` with 4 test scenarios (basic, custom message, named branch, force push)
32
+
- Graceful skip on emulated ARM64 platforms where compiled binaries crash
33
+
-**P3 TODO item**: Auto-generate GitHub Release with changelog on version tags
34
+
35
+
### Fixed
36
+
-**Rust `exec` error handling** - Exit status is now properly propagated instead of silently discarded
37
+
-**Rust dead code cleanup** - Removed unused `--dry` flag and `shell-words` dependency
38
+
-**Go `go.mod` version** - Downgraded from unreleased 1.25.5 to 1.23 (matches CI workflow)
39
+
-**Justfile.cross `_resolve_context2`** - Fixed jq `startswith` logic (was checking wrong direction for parent path matching) and fixed `{{path}}` vs `$path` template/variable confusion
40
+
-**Justfile.cross CWD propagation** - Added `USER_CWD` env var to preserve caller's working directory through Just's CWD changes, enabling reliable CWD-based patch auto-detection
41
+
-**Justfile.cross push warning** - Changed stale "WORK IN PROGRESS" message to accurate "experimental" notice
**Git's CRISPR.** Minimalist approach for mixing "parts" of git repositories using `git worktree` + `rsync`.
8
8
@@ -160,6 +160,46 @@ If using `just`, you can override targets to add pre/post hooks:
160
160
3.**Rsync**: Efficiently syncs changes between worktree and your source tree.
161
161
4.**Crossfile**: A plain-text record of all active patches for easy sharing.
162
162
163
+
## AI-Assisted Coding and Sandbox Workflows
164
+
165
+
AI coding tools (Cursor, Copilot Workspace, Claude Code, Aider, etc.) frequently work in **subfolders** rather than the repository root. This is by design: the main `.git/` directory and full repository history are not shared with the AI tool's context, reducing noise and improving focus.
166
+
167
+
**git-cross fits this pattern naturally.** Vendored files are physical files in subfolders -- AI tools can read, modify, and reason about them directly without needing access to the upstream `.git` state.
168
+
169
+
### Docker Sandbox (`sbx`) Integration
170
+
171
+
Container-based development sandboxes (e.g. `docker sandbox`, `sbx`) create isolated environments where your code runs inside a container. These tools often support `git worktree` to share repository state without copying `.git/`:
172
+
173
+
```bash
174
+
# 1. Set up git-cross in your main repo
175
+
git cross use upstream https://github.com/example/lib.git
176
+
git cross patch upstream:src vendor/lib
177
+
178
+
# 2. Create a sandbox scoped to the vendor subfolder
179
+
sbx create --mount vendor/lib # AI tool sees only vendor/lib/
180
+
181
+
# 3. AI modifies files in the sandbox (vendor/lib/)
182
+
# 4. Push changes back upstream from the host
183
+
git cross push vendor/lib
184
+
```
185
+
186
+
**Key properties that make this work:**
187
+
-**Physical files** in subfolders (not gitlinks) -- sandbox tools mount them directly.
188
+
-**Sparse checkout** -- only the needed subdirectory is present, keeping AI context small.
189
+
-**`Crossfile` reproducibility** -- `git cross replay` reconstructs the vendored environment inside a fresh container or CI job.
190
+
-**Bidirectional sync** -- AI-generated changes in the sandbox flow back upstream via `git cross push`.
191
+
-**Hidden worktrees** -- the `.git/cross/worktrees/` directory stays on the host; the sandbox only sees clean working copies.
192
+
193
+
### Rules for AI-Assisted Development
194
+
195
+
When using AI tools with git-cross managed subfolders:
196
+
197
+
1.**Scope AI context to subfolders.** Share `vendor/<name>/` with the AI tool, not the repository root. The AI doesn't need `.git/`, `Crossfile`, or `.cross/`.
198
+
2.**Use `git cross diff` to review AI changes** before pushing upstream. This compares the local subfolder against the worktree (upstream state).
199
+
3.**Use `git cross sync` after upstream changes** to pull updates into the AI's working directory.
200
+
4.**`Crossfile` is the source of truth.** When setting up a new sandbox or CI environment, `git cross replay` recreates all patches from scratch.
201
+
5.**Worktrees enable container-aware git.** Tools like `sbx` that support `git worktree` can access the repository's git state without mounting the entire `.git/` directory into the container.
0 commit comments