Skip to main content

Module rule_atomic_push

Module rule_atomic_push 

Source
Expand description

Pure decision of the atomic-push transform. What: The pure decision of the atomic-push transform: insert --atomic after git push unless the caller already chose. Why: An atomic push updates every ref on the remote or none, which prevents partially applied pushes.

In TS you’d write (pseudocode):

// atomicPush(['push', 'origin', 'main']) => ['push', '--atomic', 'origin', 'main']

Functions§

atomic_push
What: Decide the transform for one command line. Result<A, B> is “either success A or failure B”; &[&[u8]] borrows the caller’s wrapper-only spellings. Why: The flag goes immediately after push, so global options before it survive. Gotcha: Err means Git 2.56.0 itself refuses the push options; the caller forwards such a command unchanged so Git prints its own error.