Skip to content

gitserver: disable auto-gc on fetch

Warren Gifford requested to merge sh/no-auto-gc-on-fetch into main

Created by: stefanhengl

We already have janitor jobs that run git gc. We disable git gc for git-fetch to avoid a possible corruption of repositories by competing gc processes.

Test plan

  • I ran the following command on a local repo and confirmed that "git maintenance" is not called.
GIT_TRACE2=1 git fetch --no-auto-gc --progress --prune https://github.com/hashicorp/go-multierror "+refs/heads/*:refs/heads/*" "+refs/tags/*:refs/tags/*" "+refs/pull/*:refs/pull/*"

Merge request reports

Loading