From: Antonio Ospite Date: Thu, 02 Aug 2018 13:46:29 GMT Subject: [RFC PATCH v2 07/12] submodule: use 'submodule--helper config --stage' to stage .gitmodules Message-ID: <20180802134634.10300-8-ao2@ao2.it> In-Reply-To: <20180802134634.10300-1-ao2@ao2.it> Use 'git submodule--helper config --stage' in git-submodule.sh to remove the last place where the .gitmodules file is mentioned explicitly by its file path. Signed-off-by: Antonio Ospite --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index ff258e2e8c..f20c37d92d 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -289,7 +289,7 @@ or you are unsure what this means choose another name with the '--name' option." then git submodule--helper config submodule."$sm_name".branch "$branch" fi && - git add --force .gitmodules || + git submodule--helper config --stage || die "$(eval_gettext "Failed to register submodule '\$sm_path'")" # NEEDSWORK: In a multi-working-tree world, this needs to be -- 2.18.0