Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Aloni <alonid@gmail.com>2016-02-06 09:23:36 +0300
committerJunio C Hamano <gitster@pobox.com>2016-02-08 22:06:28 +0300
commit4d5c2956969a6690db2bbb2f3ff40459c09d7646 (patch)
tree947e1240cdd91641779bd739abd626954c11f4fa /Documentation/config.txt
parent59f929596b611d88270ac0fd3ea132b32d66d460 (diff)
ident: add user.useConfigOnly boolean for when ident shouldn't be guessed
It used to be that: git config --global user.email "(none)" was a viable way for people to force themselves to set user.email in each repository. This was helpful for people with more than one email address, targeting different email addresses for different clones, as it barred git from creating a commit unless the user.email config was set in the per-repo config to the correct email address. A recent change, 19ce497c (ident: keep a flag for bogus default_email, 2015-12-10), however, declared that an explicitly configured user.email is not bogus, no matter what its value is, so this hack no longer works. Provide the same functionality by adding a new configuration variable user.useConfigOnly; when this variable is set, the user must explicitly set user.email configuration. Signed-off-by: Junio C Hamano <gitster@pobox.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Dan Aloni <alonid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r--Documentation/config.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index f61788668e..068e084885 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2775,6 +2775,16 @@ user.name::
Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME'
environment variables. See linkgit:git-commit-tree[1].
+user.useConfigOnly::
+ Instruct Git to avoid trying to guess defaults for 'user.email'
+ and 'user.name', and instead retrieve the values only from the
+ configuration. For example, if you have multiple email addresses
+ and would like to use a different one for each repository, then
+ with this configuration option set to `true` in the global config
+ along with a name, Git will prompt you to set up an email before
+ making new commits in a newly cloned repository.
+ Defaults to `false`.
+
user.signingKey::
If linkgit:git-tag[1] or linkgit:git-commit[1] is not selecting the
key you want it to automatically when creating a signed tag or