[build] Make glslang build info incrementally correct

Bug: 77607
Change-Id: I271a643faba40e7998a51c1bca9a9d665a370fe5
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/glslang/+/641658
Reviewed-by: Yilong Li <liyl@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 9843b65..9074de6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -67,6 +67,11 @@
     "-o",
     rebase_path(out_file, root_build_dir),
   ]
+
+  # Ensure that this action reruns when git HEAD moves
+  inputs += [ ".git/HEAD" ]
+  # The above makes it safe to ignore other .git/* accesses.
+  hermetic_action_ignored_prefixes = [ ".git/" ]
 }
 
 action("glslang_extension_headers") {