diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2022-02-07 21:32:59 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-08 09:49:20 -0800 |
commit | 615a84ad788b26260c5b053ace2d5720ea5f05c5 (patch) | |
tree | cc23034eaf7387cded3941887b5bd35c98127c9a /userdiff.c | |
parent | Documentation: add extensions.worktreeConfig details (diff) | |
download | tgif-615a84ad788b26260c5b053ace2d5720ea5f05c5.tar.xz |
worktree: create init_worktree_config()
Upgrading a repository to use extensions.worktreeConfig is non-trivial.
There are several steps involved, including moving some config settings
from the common config file to the main worktree's config.worktree file.
The previous change updated the documentation with all of these details.
Commands such as 'git sparse-checkout set' upgrade the repository to use
extensions.worktreeConfig without following these steps, causing some
user pain in some special cases.
Create a helper method, init_worktree_config(), that will be used in a
later change to fix this behavior within 'git sparse-checkout set'. The
method is carefully documented in worktree.h.
Note that we do _not_ upgrade the repository format version to 1 during
this process. The worktree config extension must be considered by Git
and third-party tools even if core.repositoryFormatVersion is 0 for
historical reasons documented in 11664196ac ("Revert
"check_repository_format_gently(): refuse extensions for old
repositories"", 2020-07-15). This is a special case for this extension,
and newer extensions (such as extensions.objectFormat) still need to
upgrade the repository format version.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'userdiff.c')
0 files changed, 0 insertions, 0 deletions