libgit2

git_submodule_set_url

Version:

Set the URL for the submodule in the configuration

After calling this, you may wish to call git_submodule_sync() to write the changes to the checked out submodule repository.

Signature

int git_submodule_set_url(git_repository *repo, const char *name, const char *url);

Parameters

In
repo

the repository to affect

const char *
In
name

the name of the submodule to configure

const char *
In
url

URL that should be used for the submodule

Returns

int

0 on success, < 0 on failure

Versions