Skip to content

Commit

Permalink
Merge branch 'main' into multiple_branches
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperspencer authored Aug 16, 2023
2 parents e368645 + f468f48 commit e37b4c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ func TempClone(repo types.Repo, tempdir string) (*git.Repository, error) {
if err != nil {
return r, err
}

return r, nil
}

Expand Down Expand Up @@ -504,6 +503,7 @@ func CreateRemotePush(repo *git.Repository, destination types.GenRepo, url strin
}
return err
}

func RandomString(length int) string {
charset := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
seededRand := rand.New(rand.NewSource(time.Now().UnixNano()))
Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func backup(repos []types.Repo, conf *types.Conf) {
Msg(err.Error())
continue
}

defer os.RemoveAll(tempdir)
temprepo, err := local.TempClone(r, tempdir)
if err != nil {
Expand Down Expand Up @@ -314,6 +315,7 @@ func backup(repos []types.Repo, conf *types.Conf) {
Msg(err.Error())
continue
}

temprepo, err := local.TempClone(r, tempdir)
if err != nil {
if err == git.NoErrAlreadyUpToDate {
Expand Down Expand Up @@ -391,6 +393,7 @@ func backup(repos []types.Repo, conf *types.Conf) {
Msg(err.Error())
continue
}

temprepo, err := local.TempClone(r, tempdir)
if err != nil {
if err == git.NoErrAlreadyUpToDate {
Expand Down

0 comments on commit e37b4c6

Please sign in to comment.