Skip to content

Commit 7de3419

Browse files
authored
Merge pull request tensorflow#4580 from Phhere/patch-1
Support older versions of git
2 parents 7ba17e2 + e1ba779 commit 7de3419

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tensorflow/tools/git/gen_git_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def get_git_version(git_base_path):
147147
"""
148148
unknown_label = b"unknown"
149149
try:
150-
val = subprocess.check_output(["git", "-C", git_base_path, "describe",
150+
val = subprocess.check_output(["git", str("--git-dir="+git_base_path+"/.git"), str("--work-tree="+git_base_path), "describe",
151151
"--long", "--dirty", "--tags"]).strip()
152152
return val if val else unknown_label
153153
except subprocess.CalledProcessError:

0 commit comments

Comments
 (0)