diff --git a/cmd/git_test.go b/cmd/git_test.go index 1a4b12a..79241fc 100644 --- a/cmd/git_test.go +++ b/cmd/git_test.go @@ -29,6 +29,15 @@ import ( func setupRepo() (*git.Repository, error) { fs := memfs.New() repo, err := git.Init(memory.NewStorage(), fs) + if err != nil { + return nil, err + } + cfg, err := repo.Config() + if err != nil { + return nil, err + } + cfg.Author.Name = "Test Author" + cfg.Author.Email = "test_email@example.com" return repo, err } diff --git a/go.mod b/go.mod index 4956568..d04436f 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,10 @@ go 1.21 require ( github.com/Masterminds/semver v1.5.0 + github.com/go-git/go-billy/v5 v5.5.0 github.com/go-git/go-git/v5 v5.12.0 github.com/spf13/cobra v1.8.0 + github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 ) @@ -20,7 +22,6 @@ require ( github.com/emirpasic/gods v1.18.1 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -38,7 +39,6 @@ require ( github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect go.uber.org/atomic v1.9.0 // indirect