summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-05-18 22:29:22 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-05-18 22:29:22 -0600
commit68c910d2a264b68870bc84a909df6c085dd281f8 (patch)
treed1ffc0589a826b2d9fb5a13721d93d0ba5de8b92
parentcf2f151129362b678e1bbcba0d240653269ebb0a (diff)
imworkingon: Only refresh git repos once an hour
-rw-r--r--cmd/generate/gitcache.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/generate/gitcache.go b/cmd/generate/gitcache.go
index 7caf024..844408d 100644
--- a/cmd/generate/gitcache.go
+++ b/cmd/generate/gitcache.go
@@ -5,6 +5,7 @@ import (
"os"
"os/exec"
"strings"
+ "time"
"git.mothstuff.lol/lukeshu/eclipse/lib/gitcache"
)
@@ -12,7 +13,8 @@ import (
var gitFetched = map[string]struct{}{}
var gitCache = &gitcache.Cache{
- Dir: ".git-cache",
+ Dir: ".git-cache",
+ MinPeriod: 1 * time.Hour,
}
func withGit(u string, fn func(dir string) error) error {