]> git.99rst.org Git - git.git/commit
environment: stop using `the_repository` in `is_bare_repository()`
authorPatrick Steinhardt <redacted>
Thu, 11 Jun 2026 06:44:44 +0000 (08:44 +0200)
committerJunio C Hamano <redacted>
Thu, 11 Jun 2026 12:05:54 +0000 (05:05 -0700)
commit2e1d55626f06be7b9374c0a6f579959d750f0cfb
tree05618e5d43101b8286c7fc77512f71cf019667ae
parent7ff3a5895b6bf4c14d361e4c845d2de7e4006259
environment: stop using `the_repository` in `is_bare_repository()`

Refactor `is_bare_repository()` to take in a repository parameter so
that we no longer depend on `the_repository`. Adjust callers
accordingly.

Furthermore, move the function outside of the declarations that are only
available when `USE_THE_REPOSITORY_VARIABLE` is set, as it no longer
depends on that variable.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
19 files changed:
attr.c
builtin/bisect.c
builtin/blame.c
builtin/check-attr.c
builtin/fetch.c
builtin/gc.c
builtin/history.c
builtin/repack.c
builtin/repo.c
builtin/reset.c
builtin/rev-parse.c
environment.c
environment.h
mailmap.c
refs/files-backend.c
refs/reftable-backend.c
setup.c
transport.c
worktree.c
git clone https://git.99rst.org/PROJECT