Repository navigation
fix(push): commit writes made during the fetch before rebasing - #105
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 pushalso refuses to run while unresolved conflicts exist, sogit add -Acannot 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