pr-git-2388/anpl1623/master-v3
tagged this
03 Sep 02:49
From: Andrew Pleeter <andrewpleeter@gmail.com> While 'git var' exposes GIT_AUTHOR_IDENT and GIT_COMMITTER_IDENT, extracting individual components (name, email, or date) currently requires callers to manually parse the composite string. Furthermore, there is no way to query the resolved commit signing key through 'git var', and the command only accepts a single variable at a time. Teach 'git var' to expose individual identity components and commit signing configuration, and allow querying multiple variables with optional NUL-termination: - Add GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, and GIT_AUTHOR_DATE. - Add GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, and GIT_COMMITTER_DATE. - Add GIT_DEFAULT_KEY (with GIT_SIGNING_KEY alias) to resolve the configured or default commit signing key ID / fingerprint. - Allow passing multiple variable arguments (e.g., 'git var GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL') to output each variable sequentially. - Support '-z' to terminate variable outputs and 'git var -l -z' entries with NUL bytes. - Update Documentation/git-var.adoc and t/t0007-git-var.sh. Signed-off-by: Andrew Pleeter <andrewpleeter@gmail.com> Submitted-As: https://lore.kernel.org/git/pull.2388.v3.git.git.1788403792962.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2388.git.git.1787690802942.gitgitgadget@gmail.com In-Reply-To: https://lore.kernel.org/git/pull.2388.v2.git.git.1788220746663.gitgitgadget@gmail.com