From 115451d4605b880e26c59bb415b539cdce984b64 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Mon, 26 Feb 2024 20:13:16 -0500 Subject: [PATCH] Change _write to write in SubmoduleConfigParser docstring Since it appears to refer to the write method, which it overrides, rather that the nonpublic _write method (which is not overridden, and whose direct calls are not affected). --- git/objects/submodule/util.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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.