chore(sync): rebase pull and push-only-when-ahead#18
Merged
pretyflaco merged 1 commit intomainfrom May 5, 2026
Merged
Conversation
Two related defensive improvements to meet/sync.py: 1. Refuse to pull when the cloned sync repo has uncommitted changes, instead of silently swallowing a failed --ff-only pull. Surfaces manual edits in the sync clone before they get clobbered. 2. Switch the routine pull from --ff-only to --rebase so previously- created local meeting commits are preserved when the remote has moved on (e.g. another team member pushed concurrently). 3. After copying files, if there are no new file changes to commit but the local branch is ahead of the upstream (e.g. a previous sync run committed but then network failed before push), push those existing commits instead of returning early with 'already up to date'. No tests added; the sync module's surface is mostly subprocess-driven git plumbing with no existing test fixtures.
ca41a26 to
6f8f67c
Compare
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.
Summary
Three related defensive improvements to
meet sync's git-plumbing inmeet/sync.py:Refuse to pull when the cloned sync repo has uncommitted changes instead of silently swallowing a failed
--ff-onlypull. Surfaces manual edits in the sync clone before they get clobbered.Switch routine pull from
--ff-onlyto--rebaseso previously-created local meeting commits are preserved when the remote has moved on (e.g. another team member pushed concurrently).After copying files, if there are no new file changes to commit but the local branch is ahead of upstream, push those existing commits instead of returning early with "already up to date". Recovers from prior runs that committed but then failed to push (network blip).
Closes the gap where
meet synccould silently no-op while a stale local commit accumulated unpushed.Tests
No tests added; the sync module's surface is mostly subprocess-driven git plumbing with no existing test fixtures. Manual verification: ran
meet syncagainst a sandbox clone with a dangling unpushed commit; the new push-when-ahead path picks it up.