]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/config/extensions.txt
Merge branch 'ps/pack-refs-auto' into jt/reftable-geometric-compaction
[thirdparty/git.git] / Documentation / config / extensions.txt
CommitLineData
4feb562f 1extensions.objectFormat::
2 Specify the hash algorithm to use. The acceptable values are `sha1` and
3 `sha256`. If not specified, `sha1` is assumed. It is an error to specify
4 this key unless `core.repositoryFormatVersion` is 1.
5+
6Note that this setting should only be set by linkgit:git-init[1] or
7linkgit:git-clone[1]. Trying to change it after initialization will not
8work and will produce hard-to-diagnose issues.
5c11c0d5 9
9ae702fa 10extensions.compatObjectFormat::
11
12 Specify a compatitbility hash algorithm to use. The acceptable values
13 are `sha1` and `sha256`. The value specified must be different from the
14 value of extensions.objectFormat. This allows client level
15 interoperability between git repositories whose objectFormat matches
16 this compatObjectFormat. In particular when fully implemented the
17 pushes and pulls from a repository in whose objectFormat matches
18 compatObjectFormat. As well as being able to use oids encoded in
19 compatObjectFormat in addition to oids encoded with objectFormat to
20 locally specify objects.
21
d7497a42
PS
22extensions.refStorage::
23 Specify the ref storage format to use. The acceptable values are:
24+
25include::../ref-storage-format.txt[]
26+
27It is an error to specify this key unless `core.repositoryFormatVersion` is 1.
28+
29Note that this setting should only be set by linkgit:git-init[1] or
30linkgit:git-clone[1]. Trying to change it after initialization will not
31work and will produce hard-to-diagnose issues.
32
5c11c0d5
DS
33extensions.worktreeConfig::
34 If enabled, then worktrees will load config settings from the
35 `$GIT_DIR/config.worktree` file in addition to the
36 `$GIT_COMMON_DIR/config` file. Note that `$GIT_COMMON_DIR` and
37 `$GIT_DIR` are the same for the main working tree, while other
38 working trees have `$GIT_DIR` equal to
39 `$GIT_COMMON_DIR/worktrees/<id>/`. The settings in the
40 `config.worktree` file will override settings from any other
41 config files.
42+
43When enabling `extensions.worktreeConfig`, you must be careful to move
44certain values from the common config file to the main working tree's
45`config.worktree` file, if present:
46+
47* `core.worktree` must be moved from `$GIT_COMMON_DIR/config` to
48 `$GIT_COMMON_DIR/config.worktree`.
49* If `core.bare` is true, then it must be moved from `$GIT_COMMON_DIR/config`
50 to `$GIT_COMMON_DIR/config.worktree`.
51+
52It may also be beneficial to adjust the locations of `core.sparseCheckout`
53and `core.sparseCheckoutCone` depending on your desire for customizable
54sparse-checkout settings for each worktree. By default, the `git
55sparse-checkout` builtin enables `extensions.worktreeConfig`, assigns
56these config values on a per-worktree basis, and uses the
57`$GIT_DIR/info/sparse-checkout` file to specify the sparsity for each
58worktree independently. See linkgit:git-sparse-checkout[1] for more
59details.
60+
61For historical reasons, `extensions.worktreeConfig` is respected
62regardless of the `core.repositoryFormatVersion` setting.