Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
External git repository fetch fails if output base is below a git directory #4037
Comments
|
Hi! |
Description of the problem / feature request / question:
If the Bazel output base is placed below a git repository, it will fail to fetch external git repositories when running
git clone. This has come up a few times for us when users have $HOME/.git directories for managing personal rc files, and the default output base ($HOME/.cache/bazel/...) is used.The affected code is here: https://github.com/bazelbuild/bazel/blob/master/tools/build_defs/repo/git.bzl#L30
This could be avoided by setting GIT_CEILING_DIRECTORIES, or at least erroring out if the execroot is below a git directory. Currently, git gives cryptic errors about being unable to clone.
If possible, provide a minimal example to reproduce the problem:
bazel --output_user_root=/path/to/a/git/repo/bazel_outputs/ fetch //...Environment info
Operating System:
Ubuntu 16.04
Bazel version (output of
bazel info release):0.7.0
Have you found anything relevant by searching the web?
I didn't find a similar error report here or on stack overflow.