Skip to content

Proposal: csv syntax for git repos #4905

Open
@fenollp

Description

@fenollp

Today's way of expressing remote Git repos as contexts

https://github.com/user/repo.git
https://github.com/user/repo.git#
https://github.com/user/repo.git#:
https://github.com/user/repo.git#:dir
https://github.com/user/repo.git#branch_or_tag_or_commit
https://github.com/user/repo.git#branch_or_tag_or_commit:dir

does not allow

  • specify both a commit hash and e.g. a branch (as image digests do: $IMAGE_URL:mytag@sha256:cafebabe..)
    • Note importantly: tools such as renovate provide a way to upgrade digests given mytag
  • differentiating between a tag or a branch (and a non-full commit)

To permit this I propose to extend this syntax in a somewhat backwards compatible way:

https://github.com/user/repo.git##tag=mytag,branch=main,commit=cafebab,source=/dir
  • tag and branch cannot be used together
  • commit can be a short commit hash instead of a full one
  • note the leading / for source: to keep with uniformity with other csv args
  • ## usage (instead of just #) may already exist in the wild (but "unlikely" combined with csv)
  • renovate can work with branch or tag (git tags are as mutable as branches) and commit, as with images

Metadata

Metadata

Assignees

Type

No type

Projects

Status

New

Relationships

None yet

Development

No branches or pull requests

Issue actions