I have the following and am seeing a potential bug with multiple branches named similarly and a question about some behavior in the git checkout:
c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr))
if err != nil {
panic(err)
}
repo := c.Git(os.ExpandEnv("https://testing:$DAGGER_TOKEN@gitlab.private/code/repo"),
dagger.GitOpts{KeepGitDir: true})
checkout := repo.Branch("py3")
ckout := checkout.Tree()
CommitID, err := checkout.Commit(ctx)
if err != nil {
panic(err)
}
fmt.Println(CommitID)
alp := c.Container().From("alpine").
WithDirectory("/checkout", ckout)
alp.Export(ctx, "alp.tar")