Git-drive sync: push unpushed commits to their branch; auto pushes then pulls (1.54.0)#107
Merged
Merged
Conversation
…en pulls (1.54.0) Adopt omnydrive 1.11.0's pluggable GitPushPolicy on the node: protect main/master and the branch the drive was mounted to track (those still publish to a fresh feature branch), while a node-created branch — or one not yet on the origin — is pushed to directly. The client threads the mounted branch (record.gitBranch) to the node so the policy can protect it. A read-write auto sync now pushes first, then pulls, so the node's unpushed commits reach the origin before reconciling. Pushes use the drive's resolved credential (unchanged). Depends on omnydrive ^1.11.0. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
Implements the agreed git-drive push behavior on top of omnydrive 1.11.0's pluggable
GitPushPolicy.main/masterand the branch the drive was mounted to track — still publish to a fresh feature branch (never moved by a push).How
GitProvider(pushPolicy: DefaultGitPushPolicy(protectedBranches: {'main','master', <mounted branch>})).record.gitBranch) to the node via thegit.syncRPC.DriveManager._syncGitdispatches auto → push-then-pull for read-write mounts; explicit--push/--pulland read-only stay single-pass.Test plan
dart analyze+dart format --set-exit-if-changed .— clean.currentBranch.omnydrive: ^1.11.0.🤖 Generated with Claude Code