--ancestry-path returns empty when mono-filtered/main has advanced past the last forward sync (any monorepo commit causes josh to create a new filtered SHA not in the subrepo's ancestry). Use git merge-base to find the last connected point instead. Also return skip-dirty (not skip) when trees differ but no human commits found, preventing state from being updated on false skips which would permanently lose unsynced commits. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4.4 KiB
4.4 KiB
Changelog
1.3.0
Features
- Linearize fallback for reverse sync: When josh-proxy rejects a push due to unmappable merge commits, reverse sync automatically falls back to linearizing the history — cherry-picking regular commits individually and squashing only the problematic merge commits via
cherry-pick -m 1. Preserves individual commit granularity while handling complex merge topologies that josh cannot map. PR body notes when linearization was used.
Fixes
- Reverse sync human commit detection: Fixed
--ancestry-pathreturning empty whenmono-filteredhas advanced past the last forward sync. Any monorepo commit (even outside the subfolder) causes josh to create a new filtered commit, breaking the ancestry path to subrepo HEAD. Now usesgit merge-baseto find the last connected point. - State not updated on false skip: When trees differ but no human commits are found, reverse sync now returns
skip-dirtyinstead ofskip. State is not updated, so the system retries on the next run instead of silently dropping commits.
Docs
- Expanded troubleshooting guide for "Josh rejected push" with root cause analysis and prevention advice.
- Added ADR-011: Linearize fallback for reverse sync.
- Added recommended Git workflow section to the guide.
1.2.0
Features
- File exclusion:
excludeconfig field removes files/directories from the subrepo at the josh-proxy transport layer. Patterns are embedded inline in the josh-proxy URL using:exclude[::pattern,...]syntax — no extra files to generate or commit. - Filter change reconciliation: When the josh filter changes (e.g., adding/removing exclude patterns), josh-sync automatically creates a reconciliation merge commit that connects old and new histories. No manual reset or force-push required.
- Tree comparison guard: Reverse sync now compares subrepo tree to josh-filtered tree before checking commit log. Skips immediately when trees are identical, avoiding false positives from reconciliation merge history.
- Unrelated histories detection: Forward sync detects when histories are unrelated (no common ancestor) and falls back to reconciliation instead of creating a useless conflict PR.
Fixes
- Pre-v1.2 state compatibility: When upgrading from v1.0/v1.1 (no
josh_filterstored in state), the old filter is derived fromsubfolderso reconciliation triggers correctly. - Reconciliation merge parent order: Josh-filtered history is always first parent so josh-proxy can follow first-parent traversal back to the monorepo.
- Reverse sync
--ancestry-pathflag prevents old subrepo history from leaking through reconciliation merge parents. - PR body
\nnow renders as actual newlines instead of literal text. - Conflict result no longer updates sync state (added
continueto skip state write). action.ymlnow copies VERSION file for correct--versionoutput in CI..gitignorenow includesdist/and.env.
1.1.0
Features
onboardcommand: Interactive, resumable workflow for importing existing subrepos into the monorepo. Walks through: prerequisites check, import (creates PRs), wait for merge, reset (pushes josh-filtered history). Checkpoint/resume at every step.migrate-prcommand: Migrates open PRs from an archived subrepo to the new one. Supports interactive selection,--allflag, and specific PR numbers. Usesgit apply --3wayfor resilient patch application.- Onboard state tracking: Stored on the
josh-sync-statebranch at<target>/onboard.json. Tracks step progress, import PR numbers, reset branches, and migrated PRs.
1.0.0
Initial release. Extracted from private-monorepo-example into a standalone reusable library.
Features
- Bidirectional sync: forward (mono → subrepo) and reverse (subrepo → mono)
- Multi-target support via
.josh-sync.ymlconfig - Per-target credential overrides (SSH keys, HTTPS tokens)
- Force-with-lease safety for forward sync
- Loop prevention via git trailers
- State tracking on orphan branch (
josh-sync-state) - Initial import and subrepo reset commands
- Composite action for Gitea/GitHub CI
- Nix flake with devenv module
- Preflight validation checks
- Config schema (JSON Schema)
Breaking Changes (vs. inline scripts)
- Python + pyyaml replaced by yq-go (single static binary)
- 7 separate scripts replaced by single
josh-syncCLI - Consumer workflows use composite action (
uses: https://your-gitea/org/josh-sync@v1)