Skip to content

filter: 'tree:0' incompatible with lfs: true #2251

@edwardpeek-crown-public

Description

Trying to clone a repo with the following two options both set fails:

  • filter: 'tree:0'
  • lfs: true

The given error is:

Could not scan for Git LFS files

missing object: REDACTED-SHA

where the SHA is for some arbitrary git blob (not LFS blob) from the worktree of the cloned ref.

The issue appears to be that the issued /usr/bin/git lfs fetch origin refs/remotes/origin/REDACTED-BRANCH command can't handle the filtered worktree blobs, whereas a normal git switch will correctly fetch the git blobs, then LFS blobs automatically.

The runner is a self-hosted node running Ubuntu 24.04 LTS, git version 2.43.0, git-lfs/3.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions