Skip to main content

Module command_push

Module command_push 

Source
Expand description

The Git 2.56.0 option table of git push and its facts. What: The complete git push option table of Git 2.56.0 and the facts read from it. Why: The atomic-push transform must know whether the caller already chose atomicity, and the manual-push gate whether the push is a dry run; both in every spelling Git accepts (--at, --no-at, -nf), which a list of exact tokens misses.

In TS you’d write (pseudocode):

// parsePushRegion(postSubcommandArgs): PushRegion  (throws OptionError)

Structs§

PushRegion
What: Final-state facts of one git push region. bool is true or false; Vec<WrapperOccurrence> is an owned list of wrapper-flag positions. Why: atomic_stated is “the caller chose”, in either direction; dry_run is the state after the last -n, --dry-run or --no-dry-run.

Constants§

ATOMIC
--atomic: request an atomic transaction on the remote side.
DRY_RUN
-n, --dry-run: do everything except send the updates.
PUSH_TABLE
What: Rows of options[] in cmd_push (builtin/push.c:707-743), in source order. &[OptionSpec] is a borrowed table baked into the program. Why: --branches is an OPT_ALIAS of --all; the two names share no prefix, so the alias needs no special ambiguity handling and is a row of its own.

Functions§

parse_push_region
What: Parse the region after push. Result<A, B> is “either success A or failure B”. Why: A region Git itself would refuse yields the refusal, never a guessed fact set.