summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorCaleb White <cdwhite3@pm.me>2024-11-29 22:23:16 +0000
committerJunio C Hamano <gitster@pobox.com>2024-12-02 09:36:18 +0900
commit2037ca85ad93ec905b46543df6df4080f6ca258b (patch)
tree17df2cdf8d6c5027dc5762571adc8a0301586baf /commit.c
parente6df1ee2c13405ef7077256fef49424f69d61125 (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