diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-04-27 14:20:20 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-04-27 14:24:31 +0300 |
commit | 3ad0e1d6fc5e130a127fd30f0e83a590d01c2e3b (patch) | |
tree | 90fd5960d3dfe255c9ddeb0e8c1e93d257bd1456 | |
parent | ccfab390f7c32dae9d5683662be62d27c80f768f (diff) |
git: Globally disable generation of server info for git-repack(1)pks-repack-dont-update-server-info
In 0d588e403 (git: Disable generation of server info in git-repack(1),
2022-03-11), we have started to disable generation of server info in
git-repack(1) by passing the `-n` flag to all invocations. This was the
best we could do because Git didn't provide any way to do this on a
global level. We have since upstreamed a new `repack.updateServerInfo`
config key though which allows us to do so.
The new config key was released with Git v2.36.0, so let's start
injecting it into git-repack(1) processes. Note that we cannot yet get
rid of the `-n` flag because the minimum required Git version is still
at v2.33.1, which doesn't understand the new config. But by injecting
the config via environment variables, Git will now also honor it in case
git-repack(1) was spawned via any intermediate command.
Further note that we cannot really test this either because we don't yet
have Git v2.36.0 as part of our CI infrastructure.
-rw-r--r-- | internal/git/command_description.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/git/command_description.go b/internal/git/command_description.go index d68560554..4cddabd18 100644 --- a/internal/git/command_description.go +++ b/internal/git/command_description.go @@ -233,6 +233,10 @@ var commandDescriptions = map[string]commandDescription{ // Write bitmap indices when packing objects, which // speeds up packfile creation for fetches. ConfigPair{Key: "repack.writeBitmaps", Value: "true"}, + // Do not run git-update-server-info(1), which generates data structures + // required to server repositories via the dumb HTTP protocol. We don't + // serve this protocol though, so it's fine to skip it. + ConfigPair{Key: "repack.updateServerInfo", Value: "false"}, }, packConfiguration()...), }, "rev-list": { |