Skip to content

git: Rely on `repack.updateServerInfo` for repacks instead of `-n`

Patrick Steinhardt requested to merge pks-git-repack-server-info-cleanup into master

By default, git-repack(1) writes will update server info that is required by the dumb HTTP transport in order to serve fetches. As GitLab does not expose the dumb HTTP transport at all, this server info is not required on our side. To stop wasting both disk space and compute we have thus started to disable updating the server info when executing git-repack(1).

When we did that, Git didn't yet have a Git config to do so. Instead, we had to manually amend all callsites of git-repack(1) to pass the -n flag. But we have since upstreamed the repack.updateServerInfo config with the upstream commit a2565c48e4 (repack: add config to skip updating server info, 2022-03-14), which we're already setting in the Git command factory.

The config has been upstreamed in Git v2.36.0, so given that the minimum required Git version is v2.38.0 we can assume it to always be present. So let's remove the -n flags and instead just rely on the Git config.

Changelog: removed

Merge request reports