message: chore: if the file in ".git/HEAD" isn't existed, ckb-bin will be re-linked every time when "cargo build"
diff: @@ -9,6 +9,7 @@ fn rerun_if_changed(path_str: &str) -> bool {
  || path.starts_with("docker")
  || path.starts_with("docs")
  || path.starts_with("test")
  + || path.starts_with(".github")
  {
  return false;
  }
  @@ -41,7 +42,11 @@ fn main() {
  let head = std::fs::read_to_string(".git/HEAD").unwrap_or_default();
  if head.starts_with("ref: ") {
  - println!("cargo:rerun-if-changed=.git/{}", head[5..].trim());
  + let path_str = format!(".git/{}", head[5..].trim());
  + let path = Path::new(&path_str);
  + if path.exists() {
  + println!("cargo:rerun-if-changed={}", path_str);
  + }
  }
  }
  