summaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-07-07 09:21:23 +0200
committerJunio C Hamano <gitster@pobox.com>2026-07-07 10:49:40 -0700
commitcf1687a41c9fc7dc9c640201303c626be54464cc (patch)
treedd91548170dd0f7e20d1f63c6c504d94df2d1607 /git-commit-script
parentd43b9acb05b666627e63f9e5fe25a818ca4c2aba (diff)
setup: split up concerns of `setup_git_env_internal()`
The function `setup_git_env_internal()` does two completely unrelated things: - It configures the repository's gitdir and propagates environment variables into it. - It configures a couple of global parameters via environment variables. The function is called when we initialize the repository's path, but it's also called via `chdir_notify_register()` whenever we change the current working directory. While we indeed have to reconfigure the gitdir in case it's a relative path, it doesn't make sense to reapply the global environment variables. Split up concerns of this function along the above delineation. Handling of the global environment variables is moved into `init_git()`, as they can be considered part of our setup procedure. 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