google / google/copybara

Docker image: partial_fetch causes git fatal error: filter can only be used...with core.partialClone

Open
#172 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.8k
Forks
345
PR merge metrics
No merged PRs in 30d

Description

Using latest copybara and `partial_fetch=True` on git.origin causes git fetch to fail with `fatal: --filter can only be used with the remote configured in core.partialClone`:

```bash
Task: Git Origin: Initializing local repo
ERROR: Error executing 'git fetch https://github.com/google/copybara.git --filter=blob:none --verbose --progress -f latest:refs/copybara_fetch/latest refs/tags/*:refs/tags/*'(exit code 128). Stderr: fatal: --filter can only be used with the remote configured in core.partialClone
```

Example workflow:

```sky
core.workflow(
name = "default",
origin = git.origin(
url = "https://github.com/google/copybara.git",
ref = "latest",
partial_fetch = True
),
destination = folder.destination(),

origin_files = glob(["**"]),
destination_files =glob(["**"]),

authoring = authoring.overwrite("anyone "),

transformations = [],
)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.