diff options
| author | Caleb White <cdwhite3@pm.me> | 2024-11-29 22:23:10 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-02 09:36:17 +0900 |
| commit | e6df1ee2c13405ef7077256fef49424f69d61125 (patch) | |
| tree | 3e514475befc6fac0a354870d244e04cf25f0a6d /Documentation | |
| parent | worktree: add relative cli/config options to `move` command (diff) | |
| download | git-e6df1ee2c13405ef7077256fef49424f69d61125.tar.gz git-e6df1ee2c13405ef7077256fef49424f69d61125.zip | |
worktree: add relative cli/config options to `repair` command
This teaches the `worktree repair` command to respect the
`--[no-]relative-paths` CLI option and `worktree.useRelativePaths`
config setting. If an existing worktree with an absolute path is repaired
with `--relative-paths`, the links will be replaced with relative paths,
even if the original path was correct. This allows a user to covert
existing worktrees between absolute/relative as desired.
To simplify things, both linking files are written when one of the files
needs to be repaired. In some cases, this fixes the other file before it
is checked, in other cases this results in a correct file being written
with the same contents.
Signed-off-by: Caleb White <cdwhite3@pm.me>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/git-worktree.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 60a671bbc2..8340b7f028 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -220,6 +220,9 @@ This can also be set up as the default behaviour by using the Link worktrees using relative paths or absolute paths (default). Overrides the `worktree.useRelativePaths` config option, see linkgit:git-config[1]. ++ +With `repair`, the linking files will be updated if there's an absolute/relative +mismatch, even if the links are correct. --[no-]track:: When creating a new branch, if `<commit-ish>` is a branch, |
