summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-01-04 14:02:57 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-01-04 14:02:57 -0800
commite54d0f5a025e124b27aab3381711721b73d5b68e (patch)
treec89b115dfcf332b8c218b175387a5e370a276bc6 /wrapper.c
parentMerge branch 'jk/send-email-ssl-errors' into maint (diff)
parentident: loosen getpwuid error in non-strict mode (diff)
downloadtgif-e54d0f5a025e124b27aab3381711721b73d5b68e.tar.xz
Merge branch 'jk/ident-loosen-getpwuid' into maint
When getpwuid() on the system returned NULL (e.g. the user is not in the /etc/passwd file or other uid-to-name mappings), the codepath to find who the user is to record it in the reflog barfed and died. Loosen the check in this codepath, which already accepts questionable ident string (e.g. host part of the e-mail address is obviously bogus), and in general when we operate fmt_ident() function in non-strict mode. * jk/ident-loosen-getpwuid: ident: loosen getpwuid error in non-strict mode ident: keep a flag for bogus default_email ident: make xgetpwuid_self() a static local helper
Diffstat (limited to 'wrapper.c')
-rw-r--r--wrapper.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/wrapper.c b/wrapper.c
index 0e22d43814..dae5675a96 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -601,18 +601,6 @@ int access_or_die(const char *path, int mode, unsigned flag)
return ret;
}
-struct passwd *xgetpwuid_self(void)
-{
- struct passwd *pw;
-
- errno = 0;
- pw = getpwuid(getuid());
- if (!pw)
- die(_("unable to look up current user in the passwd file: %s"),
- errno ? strerror(errno) : _("no such user"));
- return pw;
-}
-
char *xgetcwd(void)
{
struct strbuf sb = STRBUF_INIT;