Skip to content

Commit e63f7b0

Browse files
avargitster
authored andcommitted
submodule: remove sh function in favor of helper
Remove the now-redundant "get_default_remote" function by converting its last user to the "print-default-remote" helper. As can be seen in 1342476 ("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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1c15180 commit e63f7b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-submodule.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ cmd_update()
578578
fetch_in_submodule "$sm_path" $depth ||
579579
die "$(eval_gettext "Unable to fetch in submodule path '\$sm_path'")"
580580
fi
581-
remote_name=$(sanitize_submodule_env; cd "$sm_path" && get_default_remote)
581+
remote_name=$(sanitize_submodule_env; cd "$sm_path" && git submodule--helper print-default-remote)
582582
sha1=$(sanitize_submodule_env; cd "$sm_path" &&
583583
git rev-parse --verify "${remote_name}/${branch}") ||
584584
die "$(eval_gettext "Unable to find current \${remote_name}/\${branch} revision in submodule path '\$sm_path'")"

0 commit comments

Comments
 (0)