diff options
author | Caleb White <cdwhite3@pm.me> | 2024-11-29 22:23:16 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-02 09:36:18 +0900 |
commit | 2037ca85ad93ec905b46543df6df4080f6ca258b (patch) | |
tree | 17df2cdf8d6c5027dc5762571adc8a0301586baf /commit.c | |
parent | e6df1ee2c13405ef7077256fef49424f69d61125 (diff) |
worktree: refactor `repair_worktree_after_gitdir_move()`
This refactors `repair_worktree_after_gitdir_move()` to use the new
`write_worktree_linking_files` function. It also preserves the
relativity of the linking files; e.g., if an existing worktree used
absolute paths then the repaired paths will be absolute (and visa-versa).
`repair_worktree_after_gitdir_move()` is used to repair both sets of
worktree linking files if the `.git` directory is moved during a
re-initialization using `git init`.
This also adds a test case for reinitializing a repository that has
relative worktrees.
Signed-off-by: Caleb White <cdwhite3@pm.me>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions