From: Brandon Casey <casey@nrlssc.navy.mil>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] Disallow empty GIT_AUTHOR_NAME or GIT_COMMITTER_NAME
Date: Fri, 06 Jul 2007 12:50:11 -0500 [thread overview]
Message-ID: <468E80D3.5060706@nrlssc.navy.mil> (raw)
Attempt normal methods for determining user name if
GIT_AUTHOR_NAME or GIT_COMMITTER_NAME is set to the empty
string. Then fall back to using the user login name.
Previously, if these environment variables were set to the
empty string, a message would be printed complaining about
missing gecos information. In this case the gecos information
was never checked.
This still allows an empty GIT_AUTHOR_EMAIL or GIT_COMMITTER_EMAIL.
Possibly someone would want to use these variables to disable
the respective email address string?
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
Trivial one-liner. I made this patch against master, not
on top of my previous patch. I assume this is the preferred way.
In case anyone is interested, I am submitting this using thunderbird
by the following method.
Set thunderbird config variables according to SubmittingPatches doc.
i.e.:
Compose messages in HTML format
mailnews.send_plaintext_flowed => false
mailnews.wraplength => 0
Then I send the patch to myself using git-format-patch and then
git-send-email. These two format the patch appropriately for
submission and allow me to set the message-id.
Then I select the message, right-click and choose "Edit As New...",
edit, select the recipients, and send. I also now have a record of
the sent message which I would not have if I used only git-send-email.
-brandon
ident.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ident.c b/ident.c
index 3d49608..6932ccf 100644
--- a/ident.c
+++ b/ident.c
@@ -193,7 +193,7 @@ const char *fmt_ident(const char *name, const char *email,
int i;
setup_ident();
- if (!name)
+ if (!name || !*name)
name = git_default_name;
if (!email)
email = git_default_email;
--
1.5.3.rc0.30.g114f-dirty
next reply other threads:[~2007-07-06 17:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-06 17:50 Brandon Casey [this message]
2007-07-07 5:45 ` [PATCH] Disallow empty GIT_AUTHOR_NAME or GIT_COMMITTER_NAME Junio C Hamano
2007-07-09 16:41 ` Brandon Casey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=468E80D3.5060706@nrlssc.navy.mil \
--to=casey@nrlssc.navy.mil \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox