#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "abspath.h"
#include "gettext.h"
#include "object-file.h"
#include "parse-options.h"
#ifndef NO_UNIX_SOCKETS
#include "config.h"
#include "tempfile.h"
#include "credential.h"
#include "unix-socket.h"
struct credential_cache_entry { … };
static struct credential_cache_entry *entries;
static int entries_nr;
static int entries_alloc;
static void cache_credential(struct credential *c, int timeout)
{ … }
static struct credential_cache_entry *lookup_credential(const struct credential *c)
{ … }
static void remove_credential(const struct credential *c, int match_password)
{ … }
static timestamp_t check_expirations(void)
{ … }
static int read_request(FILE *fh, struct credential *c,
struct strbuf *action, int *timeout)
{ … }
static void serve_one_client(FILE *in, FILE *out)
{ … }
static int serve_cache_loop(int fd)
{ … }
static void serve_cache(const char *socket_path, int debug)
{ … }
static const char permissions_advice[] = …);
static void init_socket_directory(const char *path)
{ … }
int cmd_credential_cache_daemon(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{ … }
#else
int cmd_credential_cache_daemon(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{
const char * const usage[] = {
"git credential-cache--daemon [--debug] <socket-path>",
"",
"credential-cache--daemon is disabled in this build of Git",
NULL
};
struct option options[] = { OPT_END() };
argc = parse_options(argc, argv, prefix, options, usage, 0);
die(_("credential-cache--daemon unavailable; no unix socket support"));
}
#endif