pr-git-2388/anpl1623/master-v2
tagged this
31 Aug 23:59
From: Andrew Pleeter <andrewpleeter@gmail.com>
Add a builtin 'ident' command to inspect and display the resolved author
and committer identity along with optional commit signing configuration
used when creating Git commits.
While existing plumbing commands like 'git var' and 'git config' expose
individual pieces of identity and configuration, discovering what identity
and signing key will actually be attached to a new commit requires multiple
independent queries and manual correlation. 'git config' only reads raw
values without performing environment overrides or GECOS detection, while
'git var' returns full ident strings with timestamps without exposing
commit signing status.
'git ident' provides a unified command with additive, composable options:
- Identity scope selectors (-a / --author, -c / --committer) choose
which identities to format (defaulting to both when neither is specified).
- Component selectors (-n / --name, -e / --email) choose which parts
to format (defaulting to full 'Name <email>' when neither or both are
specified).
- -v / --verbose prepends 'Author: ' or 'Committer: ' role labels.
- -s / --signing-key resolves and outputs the commit signing key.
- --porcelain produces machine-readable key-value pairs.
- -z / --null terminates output records with NUL bytes.
Include documentation in Documentation/git-ident.adoc and regression
tests in t/t0015-ident.sh.
Signed-off-by: Andrew Pleeter <andrewpleeter@gmail.com>
Submitted-As: https://lore.kernel.org/git/pull.2388.v2.git.git.1788220746663.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2388.git.git.1787690802942.gitgitgadget@gmail.com