Add current submodule HEAD commit to index of superproject.
Boolean if this should immediately write the index file. If you pass this as false, you will have to get the git_index and explicitly call git_index_write()
on it to save the change.
0 on success, < 0 on failure