sync: auto-sync from GURU-BEAST-ROG at 2026-06-15 06:28:46

Author: Mike Swanson
Machine: GURU-BEAST-ROG
Timestamp: 2026-06-15 06:28:46
This commit is contained in:
2026-06-15 06:28:51 -07:00
parent b186856d6f
commit 153be4abec
2 changed files with 11 additions and 7 deletions

View File

@@ -508,20 +508,24 @@ if [ "$INCOMING_COUNT" -gt 0 ]; then
# Submodules may have advanced via the parent's gitlinks. Update them to match,
# but tolerate per-submodule failures (e.g., transient dead refs in history) —
# the working tree is still useful even if one submodule can't catch up.
# First attempt's output is captured (not streamed): a recurring, auto-healable
# cause is an untracked file colliding with the incoming gitlink commit, and git's
# raw "fatal: Unable to checkout" reads alarmingly right before a clean resolve.
# Only surface the raw output if the resolve+retry below also fails.
set +e
git submodule update --init --recursive --quiet 2>&1 | grep -v '^$' || true
SUB_RC=${PIPESTATUS[0]}
SUB_OUT=$(git submodule update --init --recursive --quiet 2>&1)
SUB_RC=$?
set -e
if [ "$SUB_RC" -ne 0 ]; then
# Most common recurring cause: an untracked file in a submodule colliding
# with the incoming gitlink commit. Resolve non-destructively and retry once.
# Move any untracked files colliding with the incoming commit aside, retry once.
if resolve_submodule_collisions; then
set +e
git submodule update --init --recursive --quiet 2>&1 | grep -v '^$' || true
SUB_RC=${PIPESTATUS[0]}
SUB_OUT=$(git submodule update --init --recursive --quiet 2>&1)
SUB_RC=$?
set -e
fi
if [ "$SUB_RC" -ne 0 ]; then
[ -n "$SUB_OUT" ] && printf '%s\n' "$SUB_OUT" | grep -v '^$'
echo -e "${YELLOW}[WARNING]${NC} One or more submodules failed to update — likely a transient dead ref. Parent repo is current; investigate the submodule manually if a pointer is wrong."
else
echo -e "${GREEN}[OK]${NC} Submodules reconciled (set aside colliding untracked file(s))."