Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/config/extensions.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / config / extensions.adoc` 173 lines ยท 7074 bytes Raw Blame History 1 extensions.*:: 2 Unless otherwise stated, is an error to specify an extension if 3 `core.repositoryFormatVersion` is not `1`. See 4 linkgit:gitrepository-layout[5]. 5 + 6 compatObjectFormat::: 7 Specify a compatibility hash algorithm to use. The acceptable values 8 are `sha1` and `sha256`. The value specified must be different from the 9 value of `extensions.objectFormat`. This allows client level 10 interoperability between git repositories whose objectFormat matches 11 this compatObjectFormat. In particular when fully implemented the 12 pushes and pulls from a repository in whose objectFormat matches 13 compatObjectFormat. As well as being able to use oids encoded in 14 compatObjectFormat in addition to oids encoded with objectFormat to 15 locally specify objects. 16 + 17 Note that the functionality enabled by this extension is incomplete and subject 18 to change. It currently exists only to allow development and testing of 19 the underlying feature and is not designed to be enabled by end users. 20 21 noop::: 22 This extension does not change git's behavior at all. It is useful only 23 for testing format-1 compatibility. 24 + 25 For historical reasons, this extension is respected regardless of the 26 `core.repositoryFormatVersion` setting. 27 28 noop-v1::: 29 This extension does not change git's behavior at all. It is useful only 30 for testing format-1 compatibility. 31 32 objectFormat::: 33 Specify the hash algorithm to use. The acceptable values are `sha1` and 34 `sha256`. If not specified, `sha1` is assumed. 35 + 36 Note that this setting should only be set by linkgit:git-init[1] or 37 linkgit:git-clone[1]. Trying to change it after initialization will not 38 work and will produce hard-to-diagnose issues. 39 40 partialClone::: 41 When enabled, indicates that the repo was created with a partial clone 42 (or later performed a partial fetch) and that the remote may have 43 omitted sending certain unwanted objects. Such a remote is called a 44 "promisor remote" and it promises that all such omitted objects can 45 be fetched from it in the future. 46 + 47 The value of this key is the name of the promisor remote. 48 + 49 For historical reasons, this extension is respected regardless of the 50 `core.repositoryFormatVersion` setting. 51 52 preciousObjects::: 53 If enabled, indicates that objects in the repository MUST NOT be deleted 54 (e.g., by `git-prune` or `git repack -d`). 55 + 56 For historical reasons, this extension is respected regardless of the 57 `core.repositoryFormatVersion` setting. 58 59 objectStorage::: 60 Specify the object storage format and a corresponding payload. The 61 value can be either a format name or a URI: 62 + 63 -- 64 * A format name alone (e.g., `files`). 65 66 * A URI format `://` explicitly specifies both the 67 format and payload (e.g., `files:///foo/bar`). 68 69 Supported formats are: 70 71 include::../object-storage-format.adoc[] 72 73 -- 74 + 75 Note that this setting should only be set by linkgit:git-init[1] or 76 linkgit:git-clone[1]. Trying to change it after initialization will make 77 preexisting objects inaccessible. 78 + 79 NOTE: This extension is still considered EXPERIMENTAL and may be subject to 80 change. 81 82 refStorage::: 83 Specify the ref storage format and a corresponding payload. The value 84 can be either a format name or a URI: 85 + 86 -- 87 * A format name alone (e.g., `reftable` or `files`). 88 89 * A URI format `://` explicitly specifies both the 90 format and payload (e.g., `reftable:///foo/bar`). 91 92 Supported format names are: 93 94 include::../ref-storage-format.adoc[] 95 96 The payload is passed directly to the reference backend. For the files and 97 reftable backends, this must be a filesystem path where the references will 98 be stored. Defaulting to the commondir when no payload is provided. Relative 99 paths are resolved relative to the `$GIT_DIR`. Future backends may support 100 other payload schemes, e.g., postgres://127.0.0.1:5432?database=myrepo. 101 -- 102 + 103 Note that this setting should only be set by linkgit:git-init[1] or 104 linkgit:git-clone[1]. Trying to change it after initialization will not 105 work and will produce hard-to-diagnose issues. 106 107 relativeWorktrees::: 108 If enabled, indicates at least one worktree has been linked with 109 relative paths. Automatically set if a worktree has been created or 110 repaired with either the `--relative-paths` option or with the 111 `worktree.useRelativePaths` config set to `true`. 112 113 submodulePathConfig::: 114 This extension is for the minority of users who: 115 + 116 -- 117 * Encounter errors like `refusing to create ... in another submodule's git dir` 118 due to a number of reasons, like case-insensitive filesystem conflicts when 119 creating modules named `foo` and `Foo`. 120 * Require more flexible submodule layouts, for example due to nested names like 121 `foo`, `foo/bar` and `foo/baz` not supported by the default gitdir mechanism 122 which uses `.git/modules/` locations, causing further conflicts. 123 -- 124 + 125 When `extensions.submodulePathConfig` is enabled, the `submodule..gitdir` 126 config becomes the single source of truth for all submodule gitdir paths and is 127 automatically set for all new submodules both during clone and init operations. 128 + 129 Git will error out if a module does not have a corresponding 130 `submodule..gitdir` set. 131 + 132 Existing (pre-extension) submodules need to be migrated by adding the missing 133 config entries. This can be done manually, e.g. for each submodule: 134 `git config submodule..gitdir .git/modules/`, or via the 135 `git submodule--helper migrate-gitdir-configs` command which iterates over all 136 submodules and attempts to migrate them. 137 + 138 The extension can be enabled automatically for new repositories by setting 139 `init.defaultSubmodulePathConfig` to `true`, for example by running 140 `git config --global init.defaultSubmodulePathConfig true`. 141 142 worktreeConfig::: 143 If enabled, then worktrees will load config settings from the 144 `$GIT_DIR/config.worktree` file in addition to the 145 `$GIT_COMMON_DIR/config` file. Note that `$GIT_COMMON_DIR` and 146 `$GIT_DIR` are the same for the main working tree, while other 147 working trees have `$GIT_DIR` equal to 148 `$GIT_COMMON_DIR/worktrees//`. The settings in the 149 `config.worktree` file will override settings from any other 150 config files. 151 + 152 When enabling this extension, you must be careful to move 153 certain values from the common config file to the main working tree's 154 `config.worktree` file, if present: 155 + 156 -- 157 * `core.worktree` must be moved from `$GIT_COMMON_DIR/config` to 158 `$GIT_COMMON_DIR/config.worktree`. 159 * If `core.bare` is true, then it must be moved from `$GIT_COMMON_DIR/config` 160 to `$GIT_COMMON_DIR/config.worktree`. 161 -- 162 + 163 It may also be beneficial to adjust the locations of `core.sparseCheckout` 164 and `core.sparseCheckoutCone` depending on your desire for customizable 165 sparse-checkout settings for each worktree. By default, the `git 166 sparse-checkout` builtin enables this extension, assigns 167 these config values on a per-worktree basis, and uses the 168 `$GIT_DIR/info/sparse-checkout` file to specify the sparsity for each 169 worktree independently. See linkgit:git-sparse-checkout[1] for more 170 details. 171 + 172 For historical reasons, this extension is respected regardless of the 173 `core.repositoryFormatVersion` setting.