Previously, setup_worktree_build.py only compared main_repo/DEPS with worktree_dir/DEPS and assumed main_repo's dependencies were synced if the two DEPS files matched. When main_repo had pulled or checked out a new revision without running gclient sync, worktrees were symlinked to unsynced dependencies in main_repo. Check that ../.gclient_entries is at least as new as main_repo/DEPS before symlinking directly to main_repo; otherwise fall back to .deps_cache/<hash>. TAG=agy CONV=030aee38-e9f1-408a-9fca-9c36359b29d1 Change-Id: I1711292f6e1f6eee4873a48cb96ea2140072e73f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8691065 Commit-Queue: Olivier Flückiger <olivf@chromium.org> Auto-Submit: Olivier Flückiger <olivf@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Olivier Flückiger <olivf@chromium.org> Cr-Commit-Position: refs/heads/main@{#111407}