Repository navigation
fix(gitstore): push through system git, not go-git's slow PushContext - #258
Merged
Merged
Conversation
go-git's push walks the whole object graph to negotiate, and on a real board (a shallow clone that has still accumulated ~150k objects) it never finishes inside the sync's deadline, so commits sit local and the board shows them unpushed for many minutes. The system git pushes the same in about two seconds. The sync now pushes an on-disk store over an HTTP(S) remote through git (fast-forward, token via an env-fed credential helper so it is never in argv) and marks the tracking ref; an in-memory store or a custom test transport keeps the go-git push. Reject and unreachable are still classified by the follow-up fetch. Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
kvaps
marked this pull request as ready for review
September 28, 2026 08:06
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.
go-git's PushContext negotiates by walking the whole object graph. On a real board the clone stays shallow but still accumulates well over a hundred thousand objects, and the push never finishes inside the sync's deadline (in practice, not at all), so commits sit in the clone and the board shows them saved-but-not-pushed for many minutes. The system git pushes the same delta in about two seconds.
The sync now pushes an on-disk store over an HTTP(S) remote through the system git binary: fast-forward only, so a diverged remote is rejected rather than overwritten, with the token handed to git through an env-fed credential helper so it never appears in the process arguments. The tracking ref is marked on success so the board reads the commits as pushed at once. An in-memory store or a custom test transport keeps the go-git push. Rejection versus unreachable is still decided by the follow-up fetch.
The runtime image already carries git (added for the repack in v0.41.2), so there is no image change.
Adds behavior-matrix row G80 and a gitstore test that pushes through the system git to a bare local remote and confirms the tracking ref is marked.