Skip to content

Commit

Permalink
Merge pull request #16196 from yongtang/15957-branch-switch
Browse files Browse the repository at this point in the history
Fix issue of branch switching not working with bazel
  • Loading branch information
case540 committed Jan 19, 2018
2 parents ce33973 + 5410ef8 commit e810b10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions third_party/git/git_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e810b10

Please sign in to comment.