Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External git repository fetch fails if output base is below a git directory #4037

Open
mjs-sx opened this issue Nov 7, 2017 · 1 comment
Open

Comments

@mjs-sx
Copy link

@mjs-sx mjs-sx commented Nov 7, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.