mirror of
https://github.com/git/git.git
synced 2026-01-25 10:03:24 +00:00
fixup! mingw: use domain information for default email
Noticed by Coverity. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
5
ident.c
5
ident.c
@@ -169,9 +169,10 @@ const char *ident_default_email(void)
|
||||
strbuf_addstr(&git_default_email, email);
|
||||
committer_ident_explicitly_given |= IDENT_MAIL_GIVEN;
|
||||
author_ident_explicitly_given |= IDENT_MAIL_GIVEN;
|
||||
} else if ((email = query_user_email()) && email[0])
|
||||
} else if ((email = query_user_email()) && email[0]) {
|
||||
strbuf_addstr(&git_default_email, email);
|
||||
else
|
||||
free((char *)email);
|
||||
} else
|
||||
copy_email(xgetpwuid_self(&default_email_is_bogus),
|
||||
&git_default_email, &default_email_is_bogus);
|
||||
strbuf_trim(&git_default_email);
|
||||
|
||||
Reference in New Issue
Block a user