2 Commits

Author SHA1 Message Date
Tai Groot
991985ab4e update modeperm for directory creation on clone 2024-09-16 12:12:04 -07:00
417cf943fa fixup help text 2024-09-15 13:08:02 -07:00
3 changed files with 3 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ var (
log.Printf("attempting clone: %s\n", repo.Path) log.Printf("attempting clone: %s\n", repo.Path)
parentPath := filepath.Dir(repo.Path) parentPath := filepath.Dir(repo.Path)
if _, err := os.Stat(parentPath); err != nil { if _, err := os.Stat(parentPath); err != nil {
os.MkdirAll(parentPath, os.ModeDir) os.MkdirAll(parentPath, os.ModeDir|os.ModePerm)
} }
_, err = git.PlainClone(repo.Path, false, &git.CloneOptions{ _, err = git.PlainClone(repo.Path, false, &git.CloneOptions{
URL: repo.Remote, URL: repo.Remote,

View File

@@ -15,7 +15,7 @@ var (
jobs int jobs int
pullCmd = &cobra.Command{ pullCmd = &cobra.Command{
Use: "pull", Use: "pull",
Short: "add current path to list of repos", Short: "update all git repos specified in config",
Run: func(_ *cobra.Command, args []string) { Run: func(_ *cobra.Command, args []string) {
type RepoError struct { type RepoError struct {
Error error Error error

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/taigrr/mg module github.com/taigrr/mg
go 1.21 go 1.23.1
require ( require (
github.com/go-git/go-git/v5 v5.11.0 github.com/go-git/go-git/v5 v5.11.0