c
git_config_get_string("submodule.alternateLocation", &sm_alternate);
if (sm_alternate != NULL) {
    if (git_config_set_in_file(p, "submodule.alternateLocation", sm_alternate) < 0)
        die(_("Failed to set alternate location"));
}

git_config_get_string("submodule.alternateErrorStrategy", &error_strategy);
if (error_strategy != NULL) {
    if (git_config_set_in_file(p, "submodule.alternateErrorStrategy", error_strategy) < 0)
        die(_("Failed to set error strategy"));
}
