sync: Don't pull repo when doing synchronization. Do it only on auto-sync

This commit is contained in:
nemunaire 2023-05-06 02:27:46 +02:00
parent ac64db277a
commit 5fb85c22dc
5 changed files with 17 additions and 16 deletions

View file

@ -5,10 +5,13 @@ import (
"net/url"
"os"
"regexp"
"sync"
)
var gitRemoteRe = regexp.MustCompile(`^(?:(?:git@|https://)([\w.@]+)(?:/|:))((?:[\w-_]+)/(?:[\w-_/]+))(?:.git){0,1}(?:(?:/){0,1})$`)
var oneGitPull sync.Mutex
func countFileInDir(dirname string) (int, error) {
files, err := os.ReadDir(dirname)
if err != nil {