aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/build_defs/repo/git.bzl3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/build_defs/repo/git.bzl b/tools/build_defs/repo/git.bzl
index 1e410df1d2..2ac8f4e116 100644
--- a/tools/build_defs/repo/git.bzl
+++ b/tools/build_defs/repo/git.bzl
@@ -29,12 +29,15 @@ def _clone_or_update(ctx):
shallow = "--depth=1"
else:
ref = ctx.attr.branch
+ shallow = "--depth=1"
directory = str(ctx.path("."))
if ctx.attr.strip_prefix:
directory = directory + "-tmp"
if ctx.attr.shallow_since:
if ctx.attr.tag:
fail("shallow_since not allowed if a tag is specified; --depth=1 will be used for tags")
+ if ctx.attr.branch:
+ fail("shallow_since not allowed if a branch is specified; --depth=1 will be used for branches")
shallow = "--shallow-since=%s" % ctx.attr.shallow_since
if (ctx.attr.verbose):