Skip to content

Commit

Permalink
libgit2: just use github.com/google/uuid
Browse files Browse the repository at this point in the history
This is being used by the previous package being used, and further
detaches us from Kubernetes dependencies. Which are kind of weird to
depend on for a Git library...

Signed-off-by: Hidde Beydals <hello@hidde.co>
  • Loading branch information
hiddeco committed Feb 10, 2023
1 parent 0adb24c commit 228c90b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions git/libgit2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ require (
github.com/fluxcd/pkg/version v0.2.0
github.com/go-git/go-billy/v5 v5.4.1
github.com/go-logr/logr v1.2.3
github.com/google/uuid v1.3.0
github.com/libgit2/git2go/v34 v34.0.0
github.com/onsi/gomega v1.24.1
golang.org/x/crypto v0.6.0
golang.org/x/net v0.6.0
k8s.io/apimachinery v0.26.1
sigs.k8s.io/controller-runtime v0.14.4
)

Expand Down Expand Up @@ -69,7 +69,6 @@ require (
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand Down Expand Up @@ -106,6 +105,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.26.1 // indirect
k8s.io/apiextensions-apiserver v0.26.1 // indirect
k8s.io/apimachinery v0.26.1 // indirect
k8s.io/client-go v0.26.1 // indirect
k8s.io/component-base v0.26.1 // indirect
k8s.io/klog/v2 v2.90.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions git/libgit2/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"strings"

"github.com/google/uuid"
git2go "github.com/libgit2/git2go/v34"
"k8s.io/apimachinery/pkg/util/uuid"

"github.com/fluxcd/pkg/git"
)
Expand All @@ -31,7 +31,7 @@ const (
)

func getTransportOptsURL(transport git.TransportType) string {
return string(transport) + "://" + string(uuid.NewUUID())
return string(transport) + "://" + uuid.New().String()
}

func pushError(err error, url string) error {
Expand Down

0 comments on commit 228c90b

Please sign in to comment.