Skip to content

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

@tonistiigi

Description

@tonistiigi

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions