From d2de2654e4ffffb135637481a60b40bbdd0df8fb Mon Sep 17 00:00:00 2001 From: antmak Date: Tue, 26 Sep 2023 09:01:23 +0700 Subject: [PATCH] Add --prune option when updating --- mirror.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirror.go b/mirror.go index 63cf824..31f78f9 100644 --- a/mirror.go +++ b/mirror.go @@ -12,7 +12,7 @@ func mirror(cfg config, r repo) (string, error) { outStr := "" if _, err := os.Stat(repoPath); err == nil { // Directory exists, update. - cmd := exec.Command("git", "remote", "update") + cmd := exec.Command("git", "remote", "update", "--prune") cmd.Dir = repoPath out, err := cmd.CombinedOutput() outStr = string(out)