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

LLB Git should allow branch/tag ref together with commit #5871

Open
tonistiigi opened this issue Mar 21, 2025 · 1 comment · May be fixed by #5903
Open

LLB Git should allow branch/tag ref together with commit #5871

tonistiigi opened this issue Mar 21, 2025 · 1 comment · May be fixed by #5903

Comments

@tonistiigi
Copy link
Member

Current syntax supports text ref or commit after # but it should also be possible to specify both. So for example, checkout is by tag but will fail if commit sha doesn't match.

The user could atm just specify only commit but:

  • it is visually hard to understand what version it is
  • when using keep-git-dir, the checkout branch could differ.

moby/moby#49674 seems to be a use case for it. These could all use ADD instead of RUN git clone, but atm if we want to pin to a commit, we would need to add a tag as a comment only.

There is also #4905 that I think needs this as a dependency. If there is anything else #4905 needs it should be added with the same PR as well.

@AkihiroSuda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants