libgit2

git_submodule_init

Version:

Copy submodule info into ".git/config" file.

Just like "git submodule init", this copies information about the submodule into ".git/config". You can use the accessor functions above to alter the in-memory git_submodule object and control what is written to the config, overriding what is in .gitmodules.

Signature

int git_submodule_init(git_submodule *submodule, int overwrite);

Parameters

In
submodule

The submodule to write into the superproject config

int
In
overwrite

By default, existing entries will not be overwritten, but setting this to true forces them to be updated.

Returns

int

0 on success, < 0 on failure.

Versions