[PATCH] D56422: gn build: Use "git rev-parse --git-dir" to discover the path to the .git directory.

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 7 22:47:16 PST 2019


serge-sans-paille added inline comments.


================
Comment at: llvm/utils/gn/build/write_vcsrevision.py:52
+    if not os.path.isdir(git_dir):
+        print('.git dir not found at "%s"' % git_dir, file=sys.stderr)
+        return 1
----------------
For the record, on Python3, `subprocess.check_output` generates bytes and not str. It seems to be ok as an argument to `os.path.isdir`, but it requires an extra `decode()` after the `strip()`


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56422/new/

https://reviews.llvm.org/D56422





More information about the llvm-commits mailing list