chore(hooks): also fetch stylo's servo-weft branch in session setup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QS8QcxvhVJwU3X2qhPamUW
This commit is contained in:
Claude 2026-10-08 22:48:58 +00:00
parent c9c77886e2
commit e153f88ff7
No known key found for this signature in database

View file

@ -41,14 +41,18 @@ if [ -d "$SERVO_DIR" ]; then
--profile minimal -c clippy,rustfmt,llvm-tools,rustc-dev,rust-src
fi
# WEFT pins servo's `servo-weft` branch; make sure it is available locally.
if [ -d "$SERVO_DIR/.git" ]; then
git -C "$SERVO_DIR" rev-parse --verify -q origin/servo-weft >/dev/null ||
git -C "$SERVO_DIR" fetch --depth=50 origin servo-weft:refs/remotes/origin/servo-weft || true
fi
# WEFT pins servo's `servo-weft` branch, which in turn uses stylo's
# `servo-weft` branch; make sure both are available locally.
for repo in "$SERVO_DIR" "$STYLO_DIR"; do
if [ -d "$repo/.git" ]; then
git -C "$repo" rev-parse --verify -q origin/servo-weft >/dev/null ||
git -C "$repo" fetch --depth=50 origin servo-weft:refs/remotes/origin/servo-weft || true
fi
done
# Point WEFT at the local servo fork and WEFT + servo at the local stylo fork.
# These patches rewrite Cargo.lock `source` lines; don't commit those hunks.
# Check out the `servo-weft` work in both forks before building servo-embed.
if [ -d "$SERVO_DIR" ] && [ -d "$STYLO_DIR" ]; then
mkdir -p "$PARENT_DIR/.cargo"
cat > "$PARENT_DIR/.cargo/config.toml" <<CFG