Commit 955b4620db389ff8a44059853cc28991f2114339

Shahbaz Youssefi 2021-07-01T22:55:59

Fix angle_commit.h dependency when git packs refs If there are too many files in .git/refs/heads/, git packs them in .git/packed-refs. This breaks the build as gen/angle/angle_commit.h depends on .git/refs/heads/<branch-name>. With this change, when gn is run and the dependency to this file is set up, it's unpacked from .git/packed-refs if it's missing from .git/refs/heads/. One corner case not solved by this change is if a commit is amended with no changes and git packs the refs (and so the .git/refs/heads/<branch-name> file goes away), ninja doesn't rerun gn as it doesn't believe there to be any changes, yet fails the build as the dependency is now missing. Running `gn gen` manually fixes the issue. The issue is automatically fixed when switching branches. Bug: angleproject:6131 Change-Id: Ie2404e874a5cb3374a652b93faa143acb68eaa19 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3001906 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>