зеркало из https://github.com/microsoft/git.git
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 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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
1c1518071c
Коммит
e63f7b0acb
|
@ -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'")"
|
||||
|
|
Загрузка…
Ссылка в новой задаче