summaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-05-19 11:52:07 +0200
committerJunio C Hamano <gitster@pobox.com>2026-05-19 19:36:23 +0900
commit8da5ecdb4d72594ee126e949bfe813c0f89fe692 (patch)
tree705611b501e24dace5f39598dde5b8578b476f16 /git-commit-script
parentce70cbc294f2f1f9a853307d35a78baa16207e58 (diff)
setup: stop using `the_repository` in `is_inside_work_tree()`
Similar as with the preceding commit, `is_inside_work_tree()` determines whether the current working directory is located inside the worktree of `the_repository`. Perform the same refactoring by dropping the caching mechanism and injecting the repository that shall be checked. Note that, same as in the preceding commit, we're also resolving the worktree path via `realpath()`. In theory this step is not necessary as we always set the worktree path via `repo_set_worktree()`, and that function already resolves the path for us. But resolving the path a second time is unlikely to matter performance-wise, and it feels fragile to rely on the repository's worktree path being absolute. We thus perform the same extra step even though it's ultimately not required. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-commit-script')
0 files changed, 0 insertions, 0 deletions