diff options
| author | Caleb White <cdwhite3@pm.me> | 2024-11-29 22:22:55 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-02 09:36:17 +0900 |
| commit | b7016344f1d4ef8457821e0436f335ec388b8dac (patch) | |
| tree | 285880f500b6d9187ff3b5bbee93f9d2b3fa8d75 /Documentation/git-worktree.txt | |
| parent | 4dac9e3c01cf056edd315e0ed26e6df1c4d94571 (diff) | |
| download | git-b7016344f1d4ef8457821e0436f335ec388b8dac.tar.xz | |
worktree: add relative cli/config options to `add` command
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>
Diffstat (limited to 'Documentation/git-worktree.txt')
| -rw-r--r-- | Documentation/git-worktree.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 70437c815f..60a671bbc2 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -216,6 +216,11 @@ To remove a locked worktree, specify `--force` twice. This can also be set up as the default behaviour by using the `worktree.guessRemote` config option. +--[no-]relative-paths:: + Link worktrees using relative paths or absolute paths (default). + Overrides the `worktree.useRelativePaths` config option, see + linkgit:git-config[1]. + --[no-]track:: When creating a new branch, if `<commit-ish>` is a branch, mark it as "upstream" from the new branch. This is the |
