worktree: add relativeWorktrees extension

A new extension, `relativeWorktrees`, is added to indicate that at least
one worktree in the repository has been linked with relative paths.
This ensures older Git versions do not attempt to automatically prune
worktrees with relative paths, as they would not not recognize the
paths as being valid.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Caleb White <cdwhite3@pm.me>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Caleb White
2024-11-29 22:22:34 +00:00
committed by Junio C Hamano
parent d897f2c16d
commit 1860ba1a2a
5 changed files with 16 additions and 0 deletions

View File

@ -129,6 +129,7 @@ struct repository_format {
int precious_objects;
char *partial_clone; /* value of extensions.partialclone */
int worktree_config;
int relative_worktrees;
int is_bare;
int hash_algo;
int compat_hash_algo;