From e63f7b0acba326a47282036afffb83e2b3eb023d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 14 Nov 2020 13:21:31 +0100 Subject: submodule: remove sh function in favor of helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the now-redundant "get_default_remote" function by converting its last user to the "print-default-remote" helper. As can be seen in 13424764db ("submodule: port submodule subcommand 'sync' from shell to C", 2018-01-15) this helper is already used internally by the C code for submodule remote name discovery. The "get_default_remote" function in "git-parse-remote.sh" will be removed in a follow-up change. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-submodule.sh') diff --git a/git-submodule.sh b/git-submodule.sh index d39fd226d8..d39a28215c 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -578,7 +578,7 @@ cmd_update() fetch_in_submodule "$sm_path" $depth || die "$(eval_gettext "Unable to fetch in submodule path '\$sm_path'")" fi - remote_name=$(sanitize_submodule_env; cd "$sm_path" && get_default_remote) + remote_name=$(sanitize_submodule_env; cd "$sm_path" && git submodule--helper print-default-remote) sha1=$(sanitize_submodule_env; cd "$sm_path" && git rev-parse --verify "${remote_name}/${branch}") || die "$(eval_gettext "Unable to find current \${remote_name}/\${branch} revision in submodule path '\$sm_path'")" -- cgit v1.2.3