| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Replace the unsupported cherry-pick --empty=drop flag with sequential replay and state-based redundant-pick detection. Preserve initially empty commit failures and prevent rerere autoupdate from hiding conflicts. Read conflicts from the owning worktree and cover compatibility, hook failures, skip cleanup, and remembered resolutions with real-Git regressions.
| Back | FazBrowse Home | New Git URL |
Why
stack sync --apply cannot repair branches on Git 2.39 because replay passes cherry-pick --empty=drop, an option that Git does not support until 2.45. Git exits at argument parsing, so even a conflict-free replay fails.
What Changes
Empty-pick detection uses Git state, not localized stderr: exit code 1, no unmerged paths, the expected CHERRY_PICK_HEAD, a clean tracked tree, and an originally nonempty commit. Failed state inspection does not authorize a skip. Replay disables rerere's automatic index updates so a remembered conflict resolution cannot masquerade as an empty pick. Existing replay cleanup restores the current branch and removes temporary replay refs on success or failure.
Scope
Independent implementation of the compatibility problem reported in #40, with a patch changeset. No new configuration or changes to readiness policy. Sequential replay adds a Git process per commit; additional inspection runs only after a failed pick.
Verification
GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null bun run test bun run typecheck bun run format:check bun run lint bun run package:smoke bun run changeset:status --since origin/main bun src/cli.ts --help bun src/cli.ts sync --help git diff --checkAll 169 tests pass with both a locally built Git 2.39.5 and Apple Git 2.50.1 on PATH. The unmodified 0.4.3 source fails its existing clean-worktree replay test with Git 2.39.5's cherry-pick usage error.
Six new real-repository regressions cover a redundant middle commit with opaque error text, originally empty commits, owning-worktree conflicts, commit-hook failure, failed skip cleanup, and a remembered rerere resolution. A process adapter rejects --empty=drop so the compatibility regression remains effective on newer CI installations.