Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support reading GIT_AUTHOR_{NAME,EMAIL} env variables
Change the discovery of the user.name and user.email variables to first look up the user/name in the GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables. This mirrors the behavior of Git itself, see git-commit-tree(1) for details. The reason to do this is that managing your Git identity via these variables can be more conveniente than setting them in a config file, it makes it easier to set them differently on different hosts. Also change the error message we display if these aren't set, we'll now error out with something like this when we can't get an author name or an E-Mail; $ perl -Ilib bin/git-deploy start # FATAL: Please make sure you set your Git user name & E-Mail # FATAL: before using this tool, i.e. either run: # FATAL: # FATAL: git config --global user.name 'Your Name' # FATAL: git config --global user.email 'email@host.com' # FATAL: # FATAL: Or make sure the GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL # FATAL: environment variables are appropriately set. This patch is inspired by Rob's #20, I thought it made more sense to introduce a function for looking up the user name & E-Mail rather than hooking into the low-level config mechanism. This also adjusts our documentation to indicate to users that they can use this instead of setting user.{name,email}.
- Loading branch information
dc4541f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if you think this is necessary then fine.
On the other hand I feel like when doing a rollout it may be desirable to control the user name used, etc.
How could we make this check redundant in the face of something like ldapmebaby.pl?