code: def get_git_hash(from_url):
      
      from benchbuild.utils.cmd import git
      if from_url is None:
          return ""
  
      if not path.exists(from_url):
          return ""
  
      with local.cwd(from_url):
          return git("rev-parse", "HEAD", retcode=None)
docs: Get the git commit hash of HEAD from :from_url.
  
      Args:
          from_url: The file system url of our git repository.
  
      Returns:
          git commit hash of HEAD, or empty string.