What is the issue?
When using a git repository URL for a directory argument, Dagger seems to assume that the default branch is named main. This is often not the case.
I also cannot use HEAD as ref. You can see in the error message the commit HEAD is pointing to but Dagger does not handle it.
When Dagger is provided a Git URL without ref, it should mimic a git clone of that URL and not guess the default branch.
Dagger version
dagger v0.11.6 (registry.dagger.io/engine) linux/amd64
Steps to reproduce
dagger call -m github.com/jpadams/semgrep-dagger-module@2d91746e95d15790051f3e3544b51dac84743e4c scan --source https://github.com/JustinCoker991/serverless-plugin-treeshake
Stderr:
╭─ Error ──────────────────────────────────────────────────────────────────────╮
│ Function execution error: resolve: failed to load cache key: repository does │
│ not contain ref main, output: "" │
╰──────────────────────────────────────────────────────────────────────────────╯
dagger call -m github.com/jpadams/semgrep-dagger-module@2d91746e95d15790051f3e3544b51dac84743e4c scan --source https://github.com/JustinCoker991/serverless-plugin-treeshake#HEAD
Stderr:
╭─ Error ──────────────────────────────────────────────────────────────────────╮
│ Function execution error: resolve: failed to load cache key: repository does │
│ not contain ref HEAD, output: │
│ "689aa86aff89bf2e0240a12dfeee30481cce8d4b\tHEAD\n" │
╰──────────────────────────────────────────────────────────────────────────────╯
Log output
No response
What is the issue?
When using a git repository URL for a directory argument, Dagger seems to assume that the default branch is named
main. This is often not the case.I also cannot use
HEADas ref. You can see in the error message the commitHEADis pointing to but Dagger does not handle it.When Dagger is provided a Git URL without ref, it should mimic a
git cloneof that URL and not guess the default branch.Dagger version
dagger v0.11.6 (registry.dagger.io/engine) linux/amd64
Steps to reproduce
Log output
No response