summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-12-10 16:33:05 -0500
committerJunio C Hamano <gitster@pobox.com>2015-12-10 15:38:59 -0800
commite850194c83985396435b01b70d2db00b6d3af02e (patch)
treea13a88de4799865914dd7798306af1716472d376 /wrapper.c
parentbc497127894ab6ad955d474c72836c03282e6c6f (diff)
downloadgit-e850194c83985396435b01b70d2db00b6d3af02e.tar.gz
ident: make xgetpwuid_self() a static local helper
This function is defined in wrapper.c, but nobody besides ident.c uses it. And nobody is likely to in the future, either, as anything that cares about the user's name should be going through the ident code. Moving it here is a cleanup of the global namespace, but it will also enable further cleanups inside ident.c. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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;