From d774987697824c489ce97e7664e92aeeaffd94be Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 22 May 2024 18:03:48 +0100 Subject: git.sh: skip submodules if .gitmodules missing Signed-off-by: Leah Rowe --- include/git.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/git.sh b/include/git.sh index 26720757..cd4d788f 100755 --- a/include/git.sh +++ b/include/git.sh @@ -115,8 +115,8 @@ git_prep() prep_submodules() { - [ ! -f "$tmpgit/.gitmodules" ] || git -C "$tmpgit" submodule \ - update --init --checkout || $err "git_prep $1: !submod" + [ -f "$tmpgit/.gitmodules" ] || return 0 + git -C "$tmpgit" submodule update --init --checkout || $err "$1: !mod" mdir="${PWD}/config/submodule/$project" [ -n "$tree" ] && mdir="$mdir/$tree" -- cgit v1.2.1