This introduces the `--[no-]relative-paths` CLI option and
`worktree.useRelativePaths` configuration setting to the `worktree add`
command. When enabled these options allow worktrees to be linked using
relative paths, enhancing portability across environments where absolute
paths may differ (e.g., containerized setups, shared network drives).
Git still creates absolute paths by default, but these options allow
users to opt-in to relative paths if desired.
The t2408 test file is removed and more comprehensive tests are
written for the various worktree operations in their own files.
Signed-off-by: Caleb White <cdwhite3@pm.me>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The documentation for this option jumps right in with "With `add`",
without explaining that `add` is a sub-command of "git worktree".
Together with rather odd grammatical structure of the remainder of the
sentence, the description can be difficult for newcomers to understand.
Clarify by improving the grammar and mentioning "git worktree add"
explicitly.
Reported-by: Олег Самойлов <splarv@ya.ru>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>