Skip to content

chore(sync): rebase pull and push-only-when-ahead#18

Merged
pretyflaco merged 1 commit intomainfrom
chore/sync-rebase-and-push-ahead
May 5, 2026
Merged

chore(sync): rebase pull and push-only-when-ahead#18
pretyflaco merged 1 commit intomainfrom
chore/sync-rebase-and-push-ahead

Conversation

@pretyflaco
Copy link
Copy Markdown
Owner

Summary

Three related defensive improvements to meet sync's git-plumbing in 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 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 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 sync could 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 sync against a sandbox clone with a dangling unpushed commit; the new push-when-ahead path picks it up.

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.
@pretyflaco pretyflaco force-pushed the chore/sync-rebase-and-push-ahead branch from ca41a26 to 6f8f67c Compare May 5, 2026 09:49
@pretyflaco pretyflaco merged commit c95bb52 into main May 5, 2026
1 check passed
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