Open
Conversation
Member
|
Ill let avar apply it but I have no issues with this. |
Author
|
@avar Any additional thoughts on this? |
…ags to have the specified author/email
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 protected]'
# 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
git-deploy#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}.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up to my previous pull request, made with @avar's changes in mind.