Skip to main content

Module command_commit_table

Module command_commit_table 

Source
Expand description

The complete Git 2.56.0 option table of git commit. What: The complete option table of git commit in Git 2.56.0. Why: Declaring every option Git accepts removes the guess about whether an undeclared option consumes the next token. Rows follow builtin_commit_options (builtin/commit.c:1705-1785) in source order, which the completion control compares.

In TS you’d write (pseudocode):

// export const COMMIT_TABLE: readonly OptionSpec[] = [ ... ];

Constants§

ALL
-a, --all: stage every tracked modification before committing.
ALLOW_EMPTY
--allow-empty: permit a commit that records no change.
AMEND
--amend: replace the tip commit.
COMMIT_TABLE
What: pub const NAME: &[OptionSpec] = &[...] is a table baked into the program. &[T] is a borrowed list; Some(b'q') is “the byte q”; None is “no letter”. Why: Each row copies one Git declaration: letter, name, value arity and whether --no-<name> is accepted (false only for PARSE_OPT_NONEG).
DRY_RUN
--dry-run: show what would be committed.
FIXUP
--fixup=[(amend|reword):]<commit>.
INCLUDE
-i, --include: add the named paths to the index for this commit.
INTERACTIVE
--interactive: choose content interactively.
LONG
--long: status format that implies a dry run.
NULL
-z, --null: NUL-terminated status output, which implies a dry run.
ONLY
-o, --only: commit only the named paths.
PATCH
-p, --patch: choose hunks interactively.
PATHSPEC_FILE_NUL
--pathspec-file-nul.
PATHSPEC_FROM_FILE
--pathspec-from-file=<file>.
PORCELAIN
--porcelain: status format that implies a dry run.
SHORT
--short: status format that implies a dry run.