Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

GIT_LFS_FETCH_INCLUDE environment variable is not applied to clones of LFS files in submodules #727

@overlordofmu

Description

@overlordofmu

Describe the bug

If a submodule uses Git LFS, the GIT_LFS_ENABLED environment variable is used for the submodule clone. However, the GIT_LFS_FETCH_INCLUDE environment variable which determines the filetypes that will download the actual file instead of the Git LFS pointer is ignored for the submodule.

To Reproduce

Steps to reproduce the behavior:

  1. Fork the repository at https://github.com/overlordofmu/git-lfs-only
  2. Create a Netlify site and link it to the forked repository (no build command and no publish directory - leave them empty)
  3. Add the environment variables GIT_LFS_ENABLED=1 and GIT_LFS_FETCH_INCLUDE=*.jpg,*.png,*.jpeg,*.svg,*.gif,*.pdf,*.mp4,*.bmp,*.webp,*.mov to the web UI
  4. See that both example.mov and example.mp4 work on the deployed site (right-click and save as to example).
  5. Fork the repo here: https://github.com/overlordofmu/git-lfs-in-submodule
  6. Again add the environment variables in the web UI.
  7. See that both example.mov does not work while example.mp4 does even though both are Git LFS files on the submodule. The .mov file will be a Git LFS pointer like so:
$ cat example.mov
version https://git-lfs.github.com/spec/v1
oid sha256:6e26b46329f7e3ff304c592a93df60bb0f05ba9866373970d1b067bad6f5e49c
size 216396

Configuration

N/A

Expected behavior

The GIT_LFS_FETCH_INCLUDE environment variable will also apply to any submodules using Git LFS.

Build Output

N/A

Additional information

First reported here: https://answers.netlify.com/t/gitlfs-inside-submodule-not-working-correctly-for-some-file-types/49676

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions