Changelog: pushing no longer fails on non-linear local history (6430105805) #60
DingDingChae
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Pushed
5504d68614..6430105805tomain, carrying fix commitfa6f9a954bplus a merge that preserves the user's own11af4be095AGENTS.md edit. CI on the pushed commit: see the run list for6430105805— not yet verified at publication time.Fixed
Push failed outright with "The local-only history is not linear." (Refs Push fails outright with "The local-only history is not linear" / 有merge commit就推唔到 #58). Legacy local-commit batching runs before
pushRepoat every push call site, and its read-only preparation throws when the local-only range is not a straight parent chain. A merge commit makes it non-linear — completely ordinary, and something Git pushes without complaint — but the refusal propagated and aborted the entire push, so nothing was pushed at all.Batching is an optional repair for histories written by older app versions. A
LocalCommitBatchingGitErrorraised by the preparation phase is now logged and absorbed so the ordinary push proceeds. This is safe precisely because that refusal is raised before any mutation; a failure once rewriting has begun still propagates, so a half-rewritten history is never pushed blindly. A source-guard test pins both halves: the catch/return shape, and that the mutating call sits outside the guard.Local verification
Root
npx tsc --noEmitexit 0; prettier clean on both touched files; batching and guard suites 44/44 across five files (local-commit-batching entry points, pending-commit-push safety, cheap-lfs commit entry points, commit-push-batching, submodule mutation guard).Related investigations filed
finally), andmaterializePointerhas no local-source fallback. Fix queued behind the in-flight hashing work due to a hard coupling.label,updatedAtanddownloadCount. Fix in progress.git add -Ainto a temp index, hashing multi-GB Cheap LFS payloads into.git/objects.推咗一個好緊要嘅修復:以前未推嘅歷史入面有個merge commit,成個push就直接死俾你睇,紅字話你「歷史唔夠直」。但Git本身推merge commit推得好開心㗎!嗰個「執靚舊commit」功能純粹係加分項,做唔到就應該靜靜哋讓路,唔係賴死喺度阻住人推嘢。而家淨係「郁手之前」嗌停嗰啲當冇事照推;真係改到一半先仆街嘅,照舊即刻收手,唔會推半截歷史累街坊。
All reactions