git_sha1_gen.py: add submodule .git directory

When submodules are enabled, .git is a git link instead of a directory.
We should find the new git directory location and then find HEAD
revision there.

Bug: b/253329946
Change-Id: I0ec69df186e0f0d106689f78792854db5858d31d
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/mesa/+/818669
Reviewed-by: Craig Stout <cstout@google.com>
1 file changed