interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / Documentation / config / extensions.adoc

173 lines · 7074 bytes Raw Blame History
1extensions.*::
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+
6compatObjectFormat:::
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+
17Note that the functionality enabled by this extension is incomplete and subject
18to change. It currently exists only to allow development and testing of
19the underlying feature and is not designed to be enabled by end users.
20
21noop:::
22 This extension does not change git's behavior at all. It is useful only
23 for testing format-1 compatibility.
24+
25For historical reasons, this extension is respected regardless of the
26`core.repositoryFormatVersion` setting.
27
28noop-v1:::
29 This extension does not change git's behavior at all. It is useful only
30 for testing format-1 compatibility.
31
32objectFormat:::
33 Specify the hash algorithm to use. The acceptable values are `sha1` and
34 `sha256`. If not specified, `sha1` is assumed.
35+
36Note that this setting should only be set by linkgit:git-init[1] or
37linkgit:git-clone[1]. Trying to change it after initialization will not
38work and will produce hard-to-diagnose issues.
39
40partialClone:::
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+
47The value of this key is the name of the promisor remote.
48+
49For historical reasons, this extension is respected regardless of the
50`core.repositoryFormatVersion` setting.
51
52preciousObjects:::
53 If enabled, indicates that objects in the repository MUST NOT be deleted
54 (e.g., by `git-prune` or `git repack -d`).
55+
56For historical reasons, this extension is respected regardless of the
57`core.repositoryFormatVersion` setting.
58
59objectStorage:::
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 `<format>://<payload>` explicitly specifies both the
67 format and payload (e.g., `files:///foo/bar`).
68
69Supported formats are:
70
71include::../object-storage-format.adoc[]
72
73--
74+
75Note that this setting should only be set by linkgit:git-init[1] or
76linkgit:git-clone[1]. Trying to change it after initialization will make
77preexisting objects inaccessible.
78+
79NOTE: This extension is still considered EXPERIMENTAL and may be subject to
80change.
81
82refStorage:::
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 `<format>://<payload>` explicitly specifies both the
90 format and payload (e.g., `reftable:///foo/bar`).
91
92Supported format names are:
93
94include::../ref-storage-format.adoc[]
95
96The payload is passed directly to the reference backend. For the files and
97reftable backends, this must be a filesystem path where the references will
98be stored. Defaulting to the commondir when no payload is provided. Relative
99paths are resolved relative to the `$GIT_DIR`. Future backends may support
100other payload schemes, e.g., postgres://127.0.0.1:5432?database=myrepo.
101--
102+
103Note that this setting should only be set by linkgit:git-init[1] or
104linkgit:git-clone[1]. Trying to change it after initialization will not
105work and will produce hard-to-diagnose issues.
106
107relativeWorktrees:::
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
113submodulePathConfig:::
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/<plain-name>` locations, causing further conflicts.
123--
124+
125When `extensions.submodulePathConfig` is enabled, the `submodule.<name>.gitdir`
126config becomes the single source of truth for all submodule gitdir paths and is
127automatically set for all new submodules both during clone and init operations.
128+
129Git will error out if a module does not have a corresponding
130`submodule.<name>.gitdir` set.
131+
132Existing (pre-extension) submodules need to be migrated by adding the missing
133config entries. This can be done manually, e.g. for each submodule:
134`git config submodule.<name>.gitdir .git/modules/<name>`, or via the
135`git submodule--helper migrate-gitdir-configs` command which iterates over all
136submodules and attempts to migrate them.
137+
138The 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
142worktreeConfig:::
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/<id>/`. The settings in the
149 `config.worktree` file will override settings from any other
150 config files.
151+
152When enabling this extension, you must be careful to move
153certain 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+
163It may also be beneficial to adjust the locations of `core.sparseCheckout`
164and `core.sparseCheckoutCone` depending on your desire for customizable
165sparse-checkout settings for each worktree. By default, the `git
166sparse-checkout` builtin enables this extension, assigns
167these config values on a per-worktree basis, and uses the
168`$GIT_DIR/info/sparse-checkout` file to specify the sparsity for each
169worktree independently. See linkgit:git-sparse-checkout[1] for more
170details.
171+
172For historical reasons, this extension is respected regardless of the
173`core.repositoryFormatVersion` setting.