diff --git a/git/objects/submodule/util.py b/git/objects/submodule/util.py index 91e18a26b..b02da501e 100644 --- a/git/objects/submodule/util.py +++ b/git/objects/submodule/util.py @@ -70,8 +70,9 @@ def find_first_remote_branch(remotes: Sequence["Remote"], branch_name: str) -> " class SubmoduleConfigParser(GitConfigParser): - """Catches calls to _write, and updates the ``.gitmodules`` blob in the index - with the new data, if we have written into a stream. + """Catches calls to :meth:`~git.config.GitConfigParser.write`, and updates the + ``.gitmodules`` blob in the index with the new data, if we have written into a + stream. Otherwise it would add the local file to the index to make it correspond with the working tree. Additionally, the cache must be cleared.