From: "Govind Salinas" <govind@sophiasuchtig.com>
To: "Git Mailing List" <git@vger.kernel.org>
Cc: "Junio C Hamano" <gitster@pobox.com>
Subject: [PATCH] commit.c: guard config parser from value=NULL
Date: Sat, 9 Feb 2008 14:16:10 -0600 [thread overview]
Message-ID: <5d46db230802091216h40f88f06r20ebb84de6717af6@mail.gmail.com> (raw)
Signed-off-by: Govind Salinas <blix@sophiasuchtig.com>
---
config.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index 498259e..8247e88 100644
--- a/config.c
+++ b/config.c
@@ -407,12 +407,12 @@ int git_default_config(const char *var, const char *value)
return 0;
}
- if (!strcmp(var, "user.name")) {
+ if (value && !strcmp(var, "user.name")) {
strlcpy(git_default_name, value, sizeof(git_default_name));
return 0;
}
- if (!strcmp(var, "user.email")) {
+ if (value && !strcmp(var, "user.email")) {
strlcpy(git_default_email, value, sizeof(git_default_email));
return 0;
}
--
1.5.4.36.g9af61
next reply other threads:[~2008-02-09 20:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 20:16 Govind Salinas [this message]
2008-02-10 2:57 ` [PATCH] commit.c: guard config parser from value=NULL Junio C Hamano
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=5d46db230802091216h40f88f06r20ebb84de6717af6@mail.gmail.com \
--to=govind@sophiasuchtig.com \
--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;
as well as URLs for NNTP newsgroup(s).