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 /builtin/commit-graph.c | |
parent | 298d2917e26520791b47ba5d38c1866e21894cc7 (diff) |
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 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions