submodule--helper run-update-procedure: remove --suboid

Teach run-update-procedure to determine the oid of the submodule's HEAD
instead of doing it in git-submodule.sh.

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Glen Choo
2022-03-04 16:13:52 -08:00
committed by Junio C Hamano
parent 1a0b78c953
commit e441966596
2 changed files with 7 additions and 10 deletions

View File

@@ -406,14 +406,9 @@ cmd_update()
displaypath=$(git submodule--helper relative-path "$prefix$sm_path" "$wt_prefix")
if test $just_cloned -eq 1
if test $just_cloned -eq 0
then
subsha1=
else
just_cloned=
subsha1=$(sanitize_submodule_env; cd "$sm_path" &&
git rev-parse --verify HEAD) ||
die "fatal: $(eval_gettext "Unable to find current revision in submodule path '\$displaypath'")"
fi
if test -n "$remote"
@@ -441,7 +436,6 @@ cmd_update()
${update:+--update "$update"} \
${prefix:+--recursive-prefix "$prefix"} \
${sha1:+--oid "$sha1"} \
${subsha1:+--suboid "$subsha1"} \
"--" \
"$sm_path")