Sha256: 64741c1545408dedd45959b7a41a48ad03ef14700f7d45a0eb27d91b9d2b3046

Contents?: true

Size: 877 Bytes

Versions: 6

Compression:

Stored size: 877 Bytes

Contents

/*
 * Copyright (C) the libgit2 contributors. All rights reserved.
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */

#include "proxy.h"

#include "git2/proxy.h"

int git_proxy_init_options(git_proxy_options *opts, unsigned int version)
{
	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
		opts, version, git_proxy_options, GIT_PROXY_OPTIONS_INIT);
	return 0;
}

int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src)
{
	if (!src) {
		git_proxy_init_options(tgt, GIT_PROXY_OPTIONS_VERSION);
		return 0;
	}

	memcpy(tgt, src, sizeof(git_proxy_options));
	if (src->url) {
		tgt->url = git__strdup(src->url);
		GIT_ERROR_CHECK_ALLOC(tgt->url);
	}

	return 0;
}

void git_proxy_options_clear(git_proxy_options *opts)
{
	git__free((char *) opts->url);
	opts->url = NULL;
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rugged-0.28.5 vendor/libgit2/src/proxy.c
rugged-0.28.4.1 vendor/libgit2/src/proxy.c
rugged-0.28.3.1 vendor/libgit2/src/proxy.c
rugged-0.28.2 vendor/libgit2/src/proxy.c
rugged-0.28.1 vendor/libgit2/src/proxy.c
rugged-0.28.0 vendor/libgit2/src/proxy.c