]> Kevux Git Server - rit/commit
environment: make `get_git_work_tree()` accept a repository
authorPatrick Steinhardt <ps@pks.im>
Thu, 12 Sep 2024 11:29:40 +0000 (13:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Sep 2024 17:15:40 +0000 (10:15 -0700)
commitedc2c92624a5389836789579ff11417ca1c61ea0
tree9597cdfadbcde959b6d119894a1b08d89ad6e690
parent14c90ac0885c2fd1668d64084975a9ab9ef86318
environment: make `get_git_work_tree()` accept a repository

The `get_git_work_tree()` function retrieves the path of the work tree
of `the_repository`. Make it accept a `struct repository` such that it
can work on arbitrary repositories and make it part of the repository
subsystem. This reduces our reliance on `the_repository` and clarifies
scope.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
18 files changed:
builtin/blame.c
builtin/difftool.c
builtin/fsmonitor--daemon.c
builtin/init-db.c
builtin/reset.c
builtin/rev-parse.c
builtin/stash.c
builtin/submodule--helper.c
builtin/update-index.c
dir.c
environment.c
environment.h
fsmonitor.c
pathspec.c
repository.c
repository.h
setup.c
trace.c