Skip to content

Support shallow depth checkout #1347

Open

Description

@mbrancato

Description

When the "load git source" internal step runs when this action is used, it fetches the full depth of git tags. Is there a way to set a smaller depth? e.g. depth=1

This is the step I'm referring to, which will start listing off hundreds if not thousands of tags.

https://github.com/docker/docs/blob/e20141cba1746fa824c47b2b4aab300b0e3ed85c/content/manuals/build/bake/remote-definition.md?plain=1#L9-L16

Activity

  1. crazy-max commented on Apr 4, 2025

    @crazy-max
    Member

    It's depth=1 without tags if ref is not a commit sha in BuildKit atm: https://github.com/moby/buildkit/blob/7e2b28d03286206d3bee5f9fd2517b78b072f878/source/git/source.go#L482-L484

    @tonistiigi Do you think we could have an opt-in to fetch with depth 1 without tags?

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions