all repos — reposync @ 82cc6628d7ab06f27d3473702a71a8d553ec7758

Go program that clones all of my public repos from GitHub to my git server.

bug fixes
Marco Andronaco andronacomarco@gmail.com
Fri, 14 Jun 2024 02:50:25 +0200
commit

82cc6628d7ab06f27d3473702a71a8d553ec7758

parent

edbfd68c600720cf72d8889209af960411c5c1ba

1 files changed, 4 insertions(+), 6 deletions(-)

jump to
M main.gomain.go

@@ -71,8 +71,8 @@ if err := runGitCommand("clone", "--bare", repo.HTMLUrl, repoPath); err != nil {

return err } } else { - fmt.Printf("Pulling updates for repository %s...\n", repo.Name) - cmd := exec.Command("git", "-C", repoPath, "pull") + fmt.Printf("Fetching updates for bare repository %s...\n", repo.Name) + cmd := exec.Command("git", "--git-dir", repoPath, "fetch", "--all") cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil {

@@ -81,10 +81,8 @@ }

} // Write the repository description - if repo.Description != "" { - if err := writeDescription(repoPath, repo.Description); err != nil { - return fmt.Errorf("failed to write description for %s: %v", repo.Name, err) - } + if err := writeDescription(repoPath, repo.Description); err != nil { + return fmt.Errorf("failed to write description for %s: %v", repo.Name, err) } return nil