summaryrefslogtreecommitdiff
path: root/include/git.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-04-17 16:45:00 +0100
committerLeah Rowe <leah@libreboot.org>2025-04-17 16:45:00 +0100
commite4aa62f79a814929808a4598240dca7ce8ba876a (patch)
tree06272a3a6cfa4efe9e7f7fa9f57d4791f714ff67 /include/git.sh
parent2839feb9e43e44dd3f8ecbc2398dae8c0e78f3d0 (diff)
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>
Diffstat (limited to 'include/git.sh')
-rw-r--r--include/git.sh11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/git.sh b/include/git.sh
index 22c8ee70..e81c7a0d 100644
--- a/include/git.sh
+++ b/include/git.sh
@@ -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 \