You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Push reports success when the server rejects a ref #41
remote::push sets no push_update_reference callback, so when the server rejects one of the refs (non fast-forward, a tag that already exists at a different commit) libgit2 still returns Ok and the toast says "Pushed main to origin". The branch push has always had this gap, but #35 now sends every local tag alongside it, so a stale local tag is the likely way people hit it.
Fix is to set the callback in make_callbacks (or on the PushOptions), collect the per-ref status messages, and turn any rejection into an error naming the ref, same shape as git's ! [rejected] v1.0 -> v1.0 (already exists). Needs an engine test against a bare remote where the tag already points elsewhere.
Fixed in 0.18.0. push sets the update-reference callback now, collects every ref the server refuses and fails naming them, git style (origin rejected tag v1.0 (already exists)). For the record, libgit2's local transport never rejects a tag move, that rule lives in receive-pack, so the engine test only covers the message shape. The callback path still wants one check against a real remote with a moved tag, which I'll do on the next tag push.
Activity
fix(engine): report rejected refs, guide non-fast-forward pushes, ter…
cheat2001 commentedon Sep 24, 2026
Fixed in 0.18.0. push sets the update-reference callback now, collects every ref the server refuses and fails naming them, git style (
origin rejected tag v1.0 (already exists)). For the record, libgit2's local transport never rejects a tag move, that rule lives in receive-pack, so the engine test only covers the message shape. The callback path still wants one check against a real remote with a moved tag, which I'll do on the next tag push.