mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
.github: scripts: git-smart-checkout.sh
pull submodules if existing Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
857e397c15
commit
a897fecfcf
3
.github/scripts/git-smart-checkout.sh
vendored
3
.github/scripts/git-smart-checkout.sh
vendored
@@ -153,7 +153,7 @@ else
|
|||||||
clone_ok=0
|
clone_ok=0
|
||||||
for u in "${URLS[@]}"; do
|
for u in "${URLS[@]}"; do
|
||||||
log_info "Clone von $u -> $NAME (minimaler Transfer, no-checkout)"
|
log_info "Clone von $u -> $NAME (minimaler Transfer, no-checkout)"
|
||||||
clone_cmd=( git clone "--no-checkout" "--origin=origin" "$u" "$NAME" )
|
clone_cmd=( git clone "--recurse-submodules" "--no-checkout" "--origin=origin" "$u" "$NAME" )
|
||||||
(( USE_PARTIAL )) && clone_cmd+=( "--filter=blob:none" )
|
(( USE_PARTIAL )) && clone_cmd+=( "--filter=blob:none" )
|
||||||
(( FETCH_TAGS == 0 )) && clone_cmd+=( "--no-tags" )
|
(( FETCH_TAGS == 0 )) && clone_cmd+=( "--no-tags" )
|
||||||
if git_retry "clone $u" "${clone_cmd[@]}"; then
|
if git_retry "clone $u" "${clone_cmd[@]}"; then
|
||||||
@@ -258,6 +258,7 @@ log_info "forced checkout (detached) auf $TARGET_COMMIT"
|
|||||||
# Ensure no stray temp ref prevents checkout
|
# Ensure no stray temp ref prevents checkout
|
||||||
git update-ref -d "refs/tmp/$REF" >/dev/null 2>&1 || true
|
git update-ref -d "refs/tmp/$REF" >/dev/null 2>&1 || true
|
||||||
git checkout --force --detach "$TARGET_COMMIT"
|
git checkout --force --detach "$TARGET_COMMIT"
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
# Small summary
|
# Small summary
|
||||||
log_info "working dir:"
|
log_info "working dir:"
|
||||||
|
|||||||
Reference in New Issue
Block a user