git/remote-curl.c

#define USE_THE_REPOSITORY_VARIABLE

#include "git-compat-util.h"
#include "git-curl-compat.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "remote.h"
#include "connect.h"
#include "strbuf.h"
#include "walker.h"
#include "http.h"
#include "run-command.h"
#include "pkt-line.h"
#include "string-list.h"
#include "strvec.h"
#include "credential.h"
#include "oid-array.h"
#include "send-pack.h"
#include "setup.h"
#include "protocol.h"
#include "quote.h"
#include "trace2.h"
#include "transport.h"
#include "url.h"
#include "write-or-die.h"

static struct remote *remote;
/* always ends with a trailing slash */
static struct strbuf url =;

struct options {};
static struct options options;
static struct string_list cas_options =;

static int set_option(const char *name, size_t namelen, const char *value)
{}

struct discovery {};
static struct discovery *last_discovery;

static struct ref *parse_git_refs(struct discovery *heads, int for_push)
{}

/*
 * Try to detect the hash algorithm used by the remote repository when using
 * the dumb HTTP transport. As dumb transports cannot tell us the object hash
 * directly have to derive it from the advertised ref lengths.
 */
static const struct git_hash_algo *detect_hash_algo(struct discovery *heads)
{}

static struct ref *parse_info_refs(struct discovery *heads)
{}

static void free_discovery(struct discovery *d)
{}

static int show_http_message(struct strbuf *type, struct strbuf *charset,
			     struct strbuf *msg)
{}

static int get_protocol_http_header(enum protocol_version version,
				    struct strbuf *header)
{}

static void check_smart_http(struct discovery *d, const char *service,
			     struct strbuf *type)
{}

static struct discovery *discover_refs(const char *service, int for_push)
{}

static struct ref *get_refs(int for_push)
{}

static void output_refs(struct ref *refs)
{}

struct rpc_state {};

#define RPC_STATE_INIT

/*
 * Appends the result of reading from rpc->out to the string represented by
 * rpc->buf and rpc->len if there is enough space. Returns 1 if there was
 * enough space, 0 otherwise.
 *
 * If rpc->write_line_lengths is true, appends the line length as a 4-byte
 * hexadecimal string before appending the result described above.
 *
 * Writes the total number of bytes appended into appended.
 */
static int rpc_read_from_out(struct rpc_state *rpc, int options,
			     size_t *appended,
			     enum packet_read_status *status) {}

static size_t rpc_out(void *ptr, size_t eltsize,
		size_t nmemb, void *buffer_)
{}

static int rpc_seek(void *clientp, curl_off_t offset, int origin)
{}

struct check_pktline_state {};

static void check_pktline(struct check_pktline_state *state, const char *ptr, size_t size)
{}

struct rpc_in_data {};

/*
 * A callback for CURLOPT_WRITEFUNCTION. The return value is the bytes consumed
 * from ptr.
 */
static size_t rpc_in(char *ptr, size_t eltsize,
		size_t nmemb, void *buffer_)
{}

static int run_slot(struct active_request_slot *slot,
		    struct slot_results *results)
{}

static int probe_rpc(struct rpc_state *rpc, struct slot_results *results)
{}

static curl_off_t xcurl_off_t(size_t len)
{}

/*
 * If flush_received is true, do not attempt to read any more; just use what's
 * in rpc->buf.
 */
static int post_rpc(struct rpc_state *rpc, int stateless_connect, int flush_received)
{}

static int rpc_service(struct rpc_state *rpc, struct discovery *heads,
		       const char **client_argv, const struct strbuf *preamble,
		       struct strbuf *rpc_result)
{}

static int fetch_dumb(int nr_heads, struct ref **to_fetch)
{}

static int fetch_git(struct discovery *heads,
	int nr_heads, struct ref **to_fetch)
{}

static int fetch(int nr_heads, struct ref **to_fetch)
{}

static void parse_fetch(struct strbuf *buf)
{}

static void parse_get(const char *arg)
{}

static int push_dav(int nr_spec, const char **specs)
{}

static int push_git(struct discovery *heads, int nr_spec, const char **specs)
{}

static int push(int nr_spec, const char **specs)
{}

static void parse_push(struct strbuf *buf)
{}

static int stateless_connect(const char *service_name)
{}

int cmd_main(int argc, const char **argv)
{}