Skip to content

fix(push): commit writes made during the fetch before rebasing - #105

Merged
tarr1124 merged 3 commits into
mainfrom
fix/push-autostash
Oct 20, 2026
Merged

tarr1124 merged 3 commits into
mainfrom
fix/push-autostash

Conversation

@tarr1124

@tarr1124 tarr1124 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

With several Claude Code sessions on one clone, another session (or a hook writing its log) can change a file during the seconds between rill push's commit and its rebase (the fetch sits in between). The rebase then refused with 'You have unstaged changes' and the hook reported a failed sync.

Now the push commits whatever was written during the fetch right before rebasing, and if git still refuses because a write landed just before the rebase started (nothing is changed in that case), it commits and retries, up to 3 times. An earlier revision used --autostash; review showed it can lose appends from a process holding a file open, so it was dropped. rill push also refuses to run while unresolved conflicts exist, so git add -A cannot commit conflict markers.

Tests: a git shim writes a tracked file right after the fetch: the write is committed and pushed (fails on main); a conflicting mid-sync write stops like any conflict and keeps the write in a local commit. push-rebase 60/60, autosync 47/47, smoke 50/50.

🤖 Generated with Claude Code

tarr1124 and others added 3 commits October 20, 2026 11:38
…the push

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ostash from git state, not its message

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Autostash replaced files another process could still be appending to.
Commit whatever was written during the fetch, then rebase from a clean
tree; a rebase refused before it starts is retried (up to 3 times).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tarr1124 tarr1124 changed the title fix(push): rebase with --autostash fix(push): commit writes made during the fetch before rebasing Oct 20, 2026
@tarr1124
tarr1124 merged commit b68abd9 into main Oct 20, 2026
4 checks passed
@tarr1124
tarr1124 deleted the fix/push-autostash branch October 20, 2026 02:56
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.

1 participant