Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@hoelzro
Copy link

@hoelzro hoelzro commented Sep 2, 2012

This is a follow-up to my previous pull request, made with @avar's changes in mind.

@demerphq
Copy link
Member

demerphq commented Sep 2, 2012

Ill let avar apply it but I have no issues with this.

@hoelzro
Copy link
Author

hoelzro commented Sep 7, 2012

@avar Any additional thoughts on this?

avar and others added 2 commits January 23, 2013 10:49
…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@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
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}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.