Skip to content

feat: apply mirror git config for serving performance#130

Merged
alecthomas merged 1 commit intomainfrom
apply-mirror-git-config
Feb 20, 2026
Merged

feat: apply mirror git config for serving performance#130
alecthomas merged 1 commit intomainfrom
apply-mirror-git-config

Conversation

@alecthomas
Copy link
Copy Markdown
Collaborator

Closes #124

Apply git config settings from the design doc (#23) to mirror clones for optimised upload-pack serving.

Changes

  • Added mirrorConfigSettings() returning all 17 config key-value pairs (protocol, bitmaps, commit graph, multi-pack-index, unpack limits, GC, pack performance)
  • Added configureMirror() helper that applies settings via git config
  • executeClone() calls configureMirror() after clone, replacing the standalone uploadpack.allowFilter call
  • DiscoverExisting() calls configureMirror() for each discovered repo on startup so pre-existing repos get updated
  • Updated tests to verify all config values after clone and discover

Add configureMirror() helper that applies git config settings to mirror
clones for optimised upload-pack serving:

- Protocol v2, allowFilter, allowReachableSHA1InWant
- Bitmap settings for faster pack generation
- Commit graph (without Bloom filters)
- Multi-pack-index to avoid full repack on fetch
- Unpack limits to keep fetched objects as packs
- Disable auto GC (maintenance will be explicit)
- Pack performance tuning (threads, deltaCacheSize, windowMemory)

Called after git clone --mirror succeeds and for repos discovered by
DiscoverExisting() on startup, so pre-existing repos get updated.
@alecthomas alecthomas requested a review from a team as a code owner February 20, 2026 01:56
@alecthomas alecthomas requested review from worstell and removed request for a team February 20, 2026 01:56
@alecthomas alecthomas merged commit a0d8f36 into main Feb 20, 2026
5 checks passed
@alecthomas alecthomas deleted the apply-mirror-git-config branch February 20, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply mirror git config for serving performance

1 participant