libgit2

git_remote_create_with_fetchspec

Version:

Add a remote with the provided fetch refspec (or default if NULL) to the repository's configuration.

Signature

int git_remote_create_with_fetchspec(git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch);

Parameters

In
out

the resulting remote

In
repo

the repository in which to create the remote

const char *
In
name

the remote's name

const char *
In
url

the remote's url

const char *
In
fetch

the remote fetch value

Returns

int

0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code

Versions