diff options
author | Slack Coder <slackcoder@server.ky> | 2024-10-23 10:52:46 -0500 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2024-10-23 10:52:46 -0500 |
commit | e7dd47e8b683a51851883bf2918086963676d7cd (patch) | |
tree | 827067192a90b0ff4acae0263c99bfa80701b46b | |
parent | 58b725f923ce0f815b45633015306523dfc0f9a8 (diff) | |
download | mirror-master.tar.xz |
-rw-r--r-- | internal/service/git.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/service/git.go b/internal/service/git.go index b61e332..d56c96b 100644 --- a/internal/service/git.go +++ b/internal/service/git.go @@ -106,6 +106,15 @@ func MirrorGit(dst *internal.URL, src *internal.URL, description string) error { err = mapExecError(err) return fmt.Errorf("cloning: %s", err) } + + // Git mirrors are not good places for mirrored assets. + cmd = exec.Command("git", "config", "set", "cgit.snapshots", "none") + cmd.Dir = dst.Path + err = cmd.Run() + if err != nil { + err = mapExecError(err) + return fmt.Errorf("disabling cgit snapshots: %s", err) + } } err := setDescription(dst.Path, description) |