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

Local repositories containing git-lfs files can fail to be pinned in some cases #6298

Open
kit-ty-kate opened this issue Nov 14, 2024 · 0 comments

Comments

@kit-ty-kate
Copy link
Member

Detected in ocaml/setup-ocaml#895

In the issue above, the actions/checkout action will shallow-clone the source repository by default and not initialize git-lfs leaving the lfs files bare.

Now there are several problems arising with this setup when using opam:

  • opam pin add -n . will fail because it will try to use git-lfs. But git-lfs isn't setup so i'm a bit confused as to how that happens (to debug)
  • the failure message will be completely unrelated to the actual error

For some reason i'm not sure to understand yet, in 2.1 and 2.2 the error appears but only during opam install which means it is ignored. In 2.2 the error appears in opam pin and makes the command fail. I think this is something that we want to keep but it also means this is an unknowingly breaking change, although not critical as the fix is fairly straightforward and the case where people use git-lfs is fairly rare. Nevertheless i've added it to the 2.3.1 milestone while we figure things out.

Testing the issue locally can be done using:

$ GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/hackwaly/ocamlearlybird
$ opam pin -n ./ocamlearlybird
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant