JGit configuration options

Legend

git optiondescription
✅option defined by native git
⃞jgit custom option not supported by native git

core options

optiondefaultgit optiondescription
core.bigFileThreshold52428800 (50 MiB)✅Maximum file size that will be delta compressed. Files larger than this size are stored deflated, without attempting delta compression.
core.compression-1 (default compression)✅An integer -1..9, indicating a default compression level. -1 is the zlib default. 0 means no compression, and 1..9 are various speed/size tradeoffs, 9 being slowest.

gc options

optiondefaultgit optiondescription
gc.aggressiveDepth50✅The depth parameter used in the delta compression algorithm used by aggressive garbage collection.
gc.aggressiveWindow250✅The window size parameter used in the delta compression algorithm used by aggressive garbage collection.
gc.auto6700✅Number of loose objects until auto gc combines all loose objects into a pack and consolidates all existing packs into one. Setting to 0 disables automatic packing of loose objects.
gc.autoDetachtrue✅Make auto gc return immediately and run in background.
gc.autoPackLimit50✅Number of packs until auto gc consolidates existing packs (except those marked with a .keep file) into a single pack. Setting gc.autoPackLimit to 0 disables automatic consolidation of packs.
gc.logExpiry1.day.ago✅If the file gc.log exists, then auto gc will print its content and exit successfully instead of running unless that file is more than gc.logExpiry old.
gc.pruneExpire2.weeks.ago✅Grace period after which unreachable objects will be pruned.
gc.prunePackExpire1.hour.ago⃞Grace period after which packfiles only containing unreachable objects will be pruned.

pack options

optiondefaultgit optiondescription
pack.bitmapContiguousCommitCount100⃞Count of most recent commits for which to build bitmaps.
pack.bitmapDistantCommitSpan5000⃞Span of commits when building bitmaps for distant history.
pack.bitmapExcessiveBranchCount100⃞The count of branches deemed “excessive”. If the count of branches in a repository exceeds this number and bitmaps are enabled, “inactive” branches will have fewer bitmaps than “active” branches.
pack.bitmapInactiveBranchAgeInDays90⃞Age in days that marks a branch as “inactive” for bitmap creation.
pack.bitmapRecentCommitCount20000⃞Count at which to switch from bitmapRecentCommitSpan to bitmapDistantCommitSpan.
pack.bitmapRecentCommitSpan100⃞Span of commits when building bitmaps for recent history.
pack.buildBitmapstrue⃞ synonym for repack.writeBitmapsWhether index writer is allowed to build bitmaps for indexes.
pack.compressioncore.compression✅Compression level applied to objects in the pack.
pack.cutDeltaChainsfalse⃞Whether existing delta chains should be cut at {@link #getMaxDeltaDepth()
pack.deltaCacheLimit100✅Maximum size in bytes of a delta to cache.
pack.deltaCacheSize52428800 (50 MiB)✅Size of the in-memory delta cache.
pack.deltaCompressiontrue⃞Whether the writer will create new deltas on the fly. true if the pack writer will create a new delta when either pack.reuseDeltas is false, or no suitable delta is available for reuse.
pack.depth50✅Maximum depth of delta chain set up for the pack writer.
pack.indexVersion2✅Pack index file format version.
pack.minSizePreventRacyPack104857600 (100 MiB)⃞Minimum packfile size for which we wait before opening a newly written pack to prevent its lastModified timestamp could be racy if pack.waitPreventRacyPack is true.
pack.preserveOldPacksfalse⃞Whether to preserve old packs in a preserved directory.
prunePreserved, only via API of PackConfigfalse⃞Whether to remove preserved pack files in a preserved directory.
pack.reuseDeltastrue⃞Whether to reuse deltas existing in repository.
pack.reuseObjectstrue⃞Whether to reuse existing objects representation in repository.
pack.singlePackfalse⃞Whether all of refs/* should be packed in a single pack.
pack.threads0 (auto-detect number of processors)✅Number of threads to use for delta compression.
pack.waitPreventRacyPackfalse⃞Whether we wait before opening a newly written pack to prevent its lastModified timestamp could be racy.
pack.window10✅Number of objects to try when looking for a delta base per thread searching for deltas.
pack.windowMemory0 (unlimited)✅Maximum number of bytes to put into the delta search window.