Merge pull request #16196 from yongtang/15957-branch-switch

Fix issue of branch switching not working with bazel
This commit is contained in:
Michael Case 2018-01-19 13:40:06 -08:00 committed by GitHub
commit e810b107d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,11 @@ def _git_conf_impl(repository_ctx):
Label("@org_tensorflow//tensorflow/tools/git:gen_git_source.py"))
generated_files_path = repository_ctx.path("gen")
r = repository_ctx.execute(
["test", "-f", "%s/.git/logs/HEAD" % tensorflow_root_path])
if r.return_code == 0:
unused_var = repository_ctx.path(Label("//:.git/HEAD")) # pylint: disable=unused-variable
result = repository_ctx.execute([
_get_python_bin(repository_ctx),
python_script_path, "--configure", tensorflow_root_path,