From 5ecbc14cac1cb641855e64dcf6e1ca6892b41ac5 Mon Sep 17 00:00:00 2001 From: Xavier Calland Date: Mon, 29 Apr 2024 11:23:39 +0200 Subject: [PATCH] zoekt-indexserver: prune branches on fetch (#769) issue: #768 --- cmd/zoekt-indexserver/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zoekt-indexserver/main.go b/cmd/zoekt-indexserver/main.go index 05140ea75..2107503a6 100644 --- a/cmd/zoekt-indexserver/main.go +++ b/cmd/zoekt-indexserver/main.go @@ -129,7 +129,7 @@ func periodicFetch(repoDir, indexDir string, opts *Options, pendingRepos chan<- // fetchGitRepo runs git-fetch, and returns true if there was an // update. func fetchGitRepo(dir string) bool { - cmd := exec.Command("git", "--git-dir", dir, "fetch", "origin") + cmd := exec.Command("git", "--git-dir", dir, "fetch", "origin", "--prune") output, err := cmd.CombinedOutput() if err != nil {