fix: update submodules to latest remote before staging in sync.sh

git add -A captured the stale submodule pointer on Howard's machine
(April 18 init, not updated) and committed it, causing a conflict.
Now sync always runs git submodule update --remote first so the pointer
is current before staging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-20 11:49:52 -07:00
parent 21417c6c20
commit ebad88de57

View File

@@ -65,6 +65,12 @@ echo -e "${GREEN}[OK]${NC} Syncing as: $USER_DISPLAY (machine: $MACHINE)"
echo ""
echo "=== Phase 1: Local changes ==="
# Update submodules to latest remote before staging so we never commit a stale pointer
if [ -f ".gitmodules" ]; then
echo -e "${GREEN}[OK]${NC} Updating submodules to latest remote..."
git submodule update --remote --quiet 2>/dev/null || true
fi
if ! git diff-index --quiet HEAD -- 2>/dev/null; then
echo -e "${YELLOW}[INFO]${NC} Local changes detected:"
git status --short