1# JGit configuration options 2 3## Legend 4 5| git option | description | 6|------------|-------------| 7| ✅ | option defined by native git | 8| ⃞ | jgit custom option not supported by native git | 9 10For details on native git options see also the official [git config documentation](https://git-scm.com/docs/git-config). 11 12## __core__ options 13 14| option | default | git option | description | 15|---------|---------|------------|-------------| 16| `core.attributesFile` | | ✅ | In addition to `.gitattributes` (per-directory) and `.git/info/attributes`, Git looks into this file for attributes . Path expansions are made the same way as for `core.excludesFile`. | 17| `core.autocrlf` | `false` | ✅ | Setting this variable to `true` is the same as setting the text attribute to `auto` on all files and `core.eol` to `crlf`. Set to `true` if you want to have CRLF line endings in your working directory and the repository has LF line endings. This variable can be set to `input`, in which case no output conversion is performed. | 18| `core.bare` | set automatically on init or clone | ✅ | If true this repository is assumed to be bare and has no working directory associated with it. If this is the case a number of commands that require a working directory will be disabled | 19| `core.bigFileThreshold` | `50 MiB` | ✅ | Files larger than this size are stored deflated, without attempting delta compression. Storing large files without delta compression avoids excessive memory usage, at the slight expense of increased disk usage. Additionally files larger than this size are always treated as binary. | 20| `core.checkstat` | | ✅ | When missing or is set to `default`, many fields in the stat structure are checked to detect if a file has been modified since Git looked at it. Checks as much of the dircache stat info as possible (in JGit limited by Java filesystem API). When set to `minimum` only checks the size and whole second part of time stamp when comparing the stat info in the dircache with actual file stat info. | 21| `core.compression` | `-1` (zlib default) | ✅ | 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.| 22| `core.deltaBaseCacheLimit` | `10 MiB` | ✅ | Maximum number of bytes to reserve for caching base objects that multiple deltafied objects reference. By storing the entire decompressed base object in a cache Git is able to avoid unpacking and decompressing frequently used base objects multiple times. | 23| `core.dfs.blockLimit` | `30 MiB` | ⃞ | Maximum number bytes of heap memory to dedicate to caching pack file data in DFS block cache. | 24| `core.dfs.blockSize` | `64 kiB` | ⃞ | Size in bytes of a single window read in from the pack file into the DFS block cache. | 25| `core.dfs.concurrencyLevel` | `32` | ⃞ | The estimated number of threads concurrently accessing the DFS block cache. | 26| `core.dfs.deltaBaseCacheLimit` | `10 MiB` | ⃞ | Maximum number of bytes to hold in per-reader DFS delta base cache. | 27| `core.dfs.streamFileThreshold` | `50 MiB` | ⃞ | The size threshold beyond which objects must be streamed. | 28| `core.dfs.streamBuffer` | Block size of the pack | ⃞ | Number of bytes to use for buffering when streaming a pack file during copying. If 0 the block size of the pack is used| 29| `core.dfs.streamRatio` | `0.30` | ⃞ | Ratio of DFS block cache to occupy with a copied pack. Values between `0` and `1.0`. | 30| `core.dirNoGitLinks` | `false` | ⃞ | If set to `true` avoid checking for submodules. See [bug 436200](https://bugs.eclipse.org/bugs/show_bug.cgi?id=436200). | 31| `core.eol` | `native` | ✅ | Sets the line ending type to use in the working directory for files that are marked as text (either by having the text attribute set, or by having `text=auto` and Git auto-detecting the contents as text). Alternatives are `lf`, `crlf` and `native`, which uses the platform’s native line ending. | 32| `core.excludesFile` | | ✅ | Specifies the pathname to the file that contains patterns to describe paths that are not meant to be tracked, in addition to `.gitignore` (per-directory) and `.git/info/exclude`. | 33| `core.fileMode` | Auto detects if file modes are supported | ✅ | Tells Git if the executable bit of files in the working tree is to be honored. | 34| `core.hideDotFiles` | `dotGitOnly` | ✅ | Windows only. If `true`, mark newly-created directories and files whose name starts with a dot as hidden. If `dotGitOnly`, only the `.git/` directory is hidden, but no other files starting with a dot. | 35| `core.hooksPath` | `$GIT_DIR/hooks` | ✅ | Path to look for hooks. | 36| `core.logAllRefUpdates` | `true` in a repository with working tree, `false` in bare repository | ✅ | Enable the reflog. | 37| `core.packedGitLimit` | `10 MiB` | ✅ | Maximum number of bytes to cache in memory from pack files. | 38| `core.packedGitMmap` | `false` | ✅ | Whether to use Java NIO virtual memory mapping for JGit buffer cache. When set to `true` enables use of Java NIO virtual memory mapping for cache windows, `false` reads entire window into a `byte[]` with standard read calls. `true` is experimental and may cause instabilities and crashes since Java doesn't support explicit unmapping of file regions mapped to virtual memory. | 39| `core.packedGitOpenFiles` | `128` | ⃞ | Maximum number of streams to open at a time. Open packs count against the process limits. | 40| `core.packedGitUseStrongRefs` | `false` | ⃞ | Whether the window cache should use strong references (`true`) or SoftReferences (`false`). When `false` the JVM will drop data cached in the JGit block cache when heap usage comes close to the maximum heap size. | 41| `core.packedGitWindowSize` | `8 kiB` | ✅ | Number of bytes of a pack file to load into memory in a single read operation. This is the "page size" of the JGit buffer cache, used for all pack access operations. All disk IO occurs as single window reads. Setting this too large may cause the process to load more data than is required; setting this too small may increase the frequency of read() system calls. | 42| `core.precomposeUnicode` | `true` on Mac OS | ✅ | MacOS only. When `true`, JGit reverts the unicode decomposition of filenames done by Mac OS. | 43| `core.quotePath` | `true` | ✅ | Commands that output paths (e.g. ls-files, diff), will quote "unusual" characters in the pathname by enclosing the pathname in double-quotes and escaping those characters with backslashes in the same way C escapes control characters (e.g. `\t` for TAB, `\n` for LF, `\\` for backslash) or bytes with values larger than `0x80` (e.g. octal `\302\265` for "micro" in UTF-8). | 44| `core.repositoryFormatVersion` | `1` | ⃞ | Internal version identifying the repository format and layout version. Don't set manually. | 45| `core.streamFileThreshold` | `50 MiB` | ⃞ | The size threshold beyond which objects must be streamed. | 46| `core.supportsAtomicFileCreation` | `true` | ⃞ | Whether the filesystem supports atomic file creation. | 47| `core.symlinks` | Auto detect if filesystem supports symlinks| ✅ | If false, symbolic links are checked out as small plain files that contain the link text. | 48| `core.trustFolderStat` | `true` | ⃞ | Whether to trust the pack folder's modification time. If `false` JGit will always scan the `.git/objects/pack` folder to check for new pack files. This can help to workaround caching issues on NFS, but reduces performance. If set to `true` it uses the `lastmodified` attribute of the folder and assumes that no new pack files can be in this folder if its modification time has not changed. | 49| `core.worktree` | Root directory of the working tree if it is not the parent directory of the `.git` directory | ✅ | The path to the root of the working tree. | 50 51## __gc__ options 52 53| option | default | git option | description | 54|---------|---------|------------|-------------| 55| `gc.aggressiveDepth` | `50` | ✅ | The depth parameter used in the delta compression algorithm used by aggressive garbage collection. | 56| `gc.aggressiveWindow` | `250` | ✅ | The window size parameter used in the delta compression algorithm used by aggressive garbage collection. | 57| `gc.auto` | `6700` | ✅ | 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. | 58| `gc.autoDetach` | `true` | ✅ | Make auto gc return immediately and run in background. | 59| `gc.autoPackLimit` | `50` | ✅ | 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. | 60| `gc.logExpiry` | `1.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. | 61| `gc.pruneExpire` | `2.weeks.ago` | ✅ | Grace period after which unreachable objects will be pruned. | 62| `gc.prunePackExpire` | `1.hour.ago` | ⃞ | Grace period after which packfiles only containing unreachable objects will be pruned. | 63 64## __http__ options 65 66| option | default | git option | description | 67|---------|---------|------------|-------------| 68| `http.cookieFile`| | ✅ | Absolute path (with tilde expansion) of a cookie file in Netscape format. | 69| `http.cookieFileCacheLimit`| 10 | ⃞ | JGit caches at most this number of the most recently used cookie files. | 70| `http.extraHeader`| | ✅ | Extra HTTP header(s) to send with HTTP requests, in the format "`Key: Value`". May appear multiple times; an empty option clears the list. | 71| `http.followRedirects`| `initial` | ✅ | `true`, `false`, or `initial`. Whether to follow a redirect always, never, or only on the first HTTP request in a git remote operation. | 72| `http.maxRedirects`| 5 | ⃞ | Maximum number of redirects to follow; can be overridden via the Java system property `http.maxRedirects`. | 73| `http.postBuffer`| `1 MiB` | ✅ | Maximum size in bytes for single HTTP POST requests; for larger requests, HTTP 1.1 chunked transfer is used. | 74| `http.saveCookies`| `false` | ✅ | Boolean; if `true` and `http.cookieFile` is set, save received cookies. | 75| `http.sslVerify`| `true` | ✅ | Boolean; whether to check SSL certificates in HTTPS connections. | 76| `http.userAgent`| | ✅ | User-agent string to send with HTTP requests. Must be 7bit-ASCII. Can be overridden via environment variable `GIT_HTTP_USER_AGENT`. | 77 78All `http.*` options can also be specified in a URL-specific way using the format `http.<url>.*`. See the official [git config documentation](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httplturlgt) for details. 79 80Proxy configuration uses the standard Java mechanisms via class `java.net.ProxySelector`. 81 82## __pack__ options 83 84| option | default | git option | description | 85|---------|---------|------------|-------------| 86| `pack.bitmapContiguousCommitCount` | `100` | ⃞ | Count of most recent commits for which to build bitmaps. | 87| `pack.bitmapDistantCommitSpan` | `5000` | ⃞ | Span of commits when building bitmaps for distant history. | 88| `pack.bitmapExcessiveBranchCount` | `100` | ⃞ | 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. | 89| `pack.bitmapInactiveBranchAgeInDays` | `90` | ⃞ | Age in days that marks a branch as "inactive" for bitmap creation. | 90| `pack.bitmapRecentCommitCount` | `20000` | ⃞ | Count at which to switch from `bitmapRecentCommitSpan` to `bitmapDistantCommitSpan`. | 91| `pack.bitmapRecentCommitSpan` | `100` | ⃞ | Span of commits when building bitmaps for recent history. | 92| `pack.buildBitmaps` | `true` | ⃞ synonym for `repack.writeBitmaps` | Whether index writer is allowed to build bitmaps for indexes. | 93| `pack.compression` | `core.compression` | ✅ | Compression level applied to objects in the pack. | 94| `pack.cutDeltaChains` | `false` | ⃞ | Whether existing delta chains should be cut at {@link #getMaxDeltaDepth() | 95| `pack.deltaCacheLimit` | `100` | ✅ | Maximum size in bytes of a delta to cache. | 96| `pack.deltaCacheSize` | `50 MiB` | ✅ | Size of the in-memory delta cache. | 97| `pack.deltaCompression` | `true` | ⃞ | 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. | 98| `pack.depth` | `50` | ✅ | Maximum depth of delta chain set up for the pack writer. | 99| `pack.indexVersion` | `2` | ✅ | Pack index file format version. | 100| `pack.minSizePreventRacyPack` | `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`. | 101| `pack.preserveOldPacks` | `false` | ⃞ | Whether to preserve old packs in a preserved directory. | 102| `prunePreserved`, only via API of PackConfig | `false` | ⃞ | Whether to remove preserved pack files in a preserved directory. | 103| `pack.reuseDeltas` | `true` |⃞ | Whether to reuse deltas existing in repository. | 104| `pack.reuseObjects` | `true` | ⃞ | Whether to reuse existing objects representation in repository. | 105| `pack.searchForReuseTimeout` | | ⃞ | Search for reuse phase timeout. Expressed as a `Duration`, i.e.: `50sec`. | 106| `pack.singlePack` | `false` | ⃞ | Whether all of `refs/*` should be packed in a single pack. | 107| `pack.threads` | `0` (auto-detect number of processors) | ✅ | Number of threads to use for delta compression. | 108| `pack.waitPreventRacyPack` | `false` | ⃞ | Whether we wait before opening a newly written pack to prevent its lastModified timestamp could be racy. | 109| `pack.window` | `10` | ✅ | Number of objects to try when looking for a delta base per thread searching for deltas. | 110| `pack.windowMemory` | `0` (unlimited) | ✅ | Maximum number of bytes to put into the delta search window. | 111