git.sh: remove prep_submodule()

merge it with git_prep, since it's only a tiny
function and only called from there. the for
loop moved to the if block still makes sense
on casual reading.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-04-17 16:45:00 +01:00
parent 2839feb9e4
commit e4aa62f79a
+3 -8
View File
@@ -56,7 +56,9 @@ git_prep()
chkvars rev
tmpclone "$1" "$2" "$tmpgit" "$rev" "$_patchdir"
if singletree "$project" || [ $# -gt 4 ]; then
prep_submodules "$_loc"
[ -f "$mdir/module.list" ] && while read -r msrcdir; do
fetch_submodule "$msrcdir"
done < "$mdir/module.list"; :
fi
[ "$project" = "coreboot" ] && [ -n "$xtree" ] && [ $# -gt 2 ] && \
@@ -67,13 +69,6 @@ git_prep()
move_repo "$_loc"
}
prep_submodules()
{
[ -f "$mdir/module.list" ] && while read -r msrcdir; do
fetch_submodule "$msrcdir"
done < "$mdir/module.list"; :
}
fetch_submodule()
{
mcfgdir="$mdir/${1##*/}"; eval \