#Go SDK Git Clone
1 messages · Page 1 of 1 (latest)
It looks like the git tree calls the buildkit git with this struct https://pkg.go.dev/github.com/moby/buildkit/client/llb#GitInfo
I assume that KeepGitDir is defaulting to false
It is possible. We should add that to the API!
Verified that we're not inlcuding .git today.
@barren trout could you open an issue that has a little info on your use case? 🙏
Your reason for needing .git to be present.
package main
import (
"context"
"fmt"
"dagger.io/dagger"
)
func main() {
ctx := context.Background()
client, _ := dagger.Connect(ctx)
defer client.Close()
dir := client.Git("https://github.com/dagger/dagger").Branch("main").Tree()
ent, _ := dir.Entries(ctx)
fmt.Println(ent)
}
output of go run
[.dockerignore .github .gitignore .golangci.yml .goreleaser.yml .markdownlint.yaml Dockerfile LICENSE NOTICE README.md RELEASING.md TESTING.md cmd codegen core demos docs engine examples go.mod go.sum internal magefile.go package.json project router sdk secret tracing tsconfig.json website yarn.lock]
Sure thing
As a workaround for now, you could use an Exec to git clone, but agree this should be in API.
Thanks for the workaround. I will add it to the issue for the time being.
What are you trying to do? I am implementing a conventional commit task and I require the .git directory to be present in my cloned repo so that I can generated a new semantic release Why is this i...
I'm taking a stab at making a pull request for this change. What is the recommended method for executing the sdk client gen? I only see the codegen lint in the magefile
I think it's go generate ./... from the root
from sdk/go (changed recently)
Ah, thanks!