From e4aa62f79a814929808a4598240dca7ce8ba876a Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 17 Apr 2025 16:45:00 +0100 Subject: 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 --- include/git.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'include/git.sh') 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 \ -- cgit v1.2.1