summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 25dc5e2)
raw | patch | inline | side by side (parent: 25dc5e2)
author | Josh Triplett <josh@freedesktop.org> | |
Sun, 29 Apr 2007 01:40:28 +0000 (18:40 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 29 Apr 2007 09:05:06 +0000 (02:05 -0700) |
Some other programs get the user's email address from $EMAIL, so fall back to
that if we don't have a Git-specific email address.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
that if we don't have a Git-specific email address.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
index e0aff5369f3b7ee3059095fc3531779e452e1db1..c257cdf525e2daa3b90140430327e6f5d2ea6bda 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
user.email::
Your email address to be recorded in any newly created commits.
- Can be overridden by the 'GIT_AUTHOR_EMAIL' and 'GIT_COMMITTER_EMAIL'
- environment variables. See gitlink:git-commit-tree[1].
+ Can be overridden by the 'GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_EMAIL', and
+ 'EMAIL' environment variables. See gitlink:git-commit-tree[1].
user.name::
Your full name to be recorded in any newly created commits.
index 1571dbbb7449fb0d790fccf6b6adbca8d4f5c664..504a3aa1b460ffac9308bec4ff72cf657f8fec30 100644 (file)
GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL
GIT_COMMITTER_DATE
+ EMAIL
(nb "<", ">" and "\n"s are stripped)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 08ba53ae010bda8970642f142c1438b73b6c38d2..c5d02dacde7a299c05ba6d44da4c988091e502c2 100644 (file)
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
'GIT_COMMITTER_NAME'::
'GIT_COMMITTER_EMAIL'::
'GIT_COMMITTER_DATE'::
+'EMAIL'::
see gitlink:git-commit-tree[1]
git Diffs
index 88e7f74e888f1c7b13182bf07afee01408e8e525..69a04b827d7805d9b29153e31e5489edb587690a 100644 (file)
--- a/ident.c
+++ b/ident.c
setup_ident();
if (!name)
name = git_default_name;
+ if (!email)
+ email = getenv("EMAIL");
if (!email)
email = git_default_email;
diff --git a/t/test-lib.sh b/t/test-lib.sh
index f2c6bd3b01d39b8cc71bc624e0eaddc0681ae25e..dee3ad76212ea95c75c8287c8d8c0f312125bd06 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
unset AUTHOR_NAME
unset COMMIT_AUTHOR_EMAIL
unset COMMIT_AUTHOR_NAME
+unset EMAIL
unset GIT_ALTERNATE_OBJECT_DIRECTORIES
unset GIT_AUTHOR_DATE
GIT_AUTHOR_EMAIL=author@example.com