Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git-compat-util.h3
-rw-r--r--ident.c12
-rw-r--r--wrapper.c12
3 files changed, 12 insertions, 15 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 4fe10cc146..0feeae2983 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -923,9 +923,6 @@ int access_or_die(const char *path, int mode, unsigned flag);
/* Warn on an inaccessible file that ought to be accessible */
void warn_on_inaccessible(const char *path);
-/* Get the passwd entry for the UID of the current process. */
-struct passwd *xgetpwuid_self(void);
-
#ifdef GMTIME_UNRELIABLE_ERRORS
struct tm *git_gmtime(const time_t *);
struct tm *git_gmtime_r(const time_t *, struct tm *);
diff --git a/ident.c b/ident.c
index 5ff1aadaaa..d7c70e28d2 100644
--- a/ident.c
+++ b/ident.c
@@ -23,6 +23,18 @@ static int author_ident_explicitly_given;
#define get_gecos(struct_passwd) ((struct_passwd)->pw_gecos)
#endif
+static 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;
+}
+
static void copy_gecos(const struct passwd *w, struct strbuf *name)
{
char *src;
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;