-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
Description
git_signature_default
parses the user.name
and user.email
values from git_config
, but does not allow for other sources of that information. Per man git-commit-tree
:
author and
committer information is taken from the following environment
variables, if set:
GIT_AUTHOR_NAME
GIT_AUTHOR_EMAIL
GIT_AUTHOR_DATE
GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL
GIT_COMMITTER_DATE
(nb "<", ">" and "\n"s are stripped)
In case (some of) these environment variables are not set, the
information is taken from the configuration items user.name and
user.email, or, if not present, the environment variable EMAIL
While the existing behavior of git_signature_default
should likely not change to take environment variables into account, I'd suggest adding a git_signature_author_env
and git_signature_committer_env
that do. Those would be the appropriate defaults to pass when creating a commit, for any program mimicking the git command-line tools.
xendarboh