mirror of
https://github.com/git/git.git
synced 2026-08-07 08:31:51 +00:00
setup: stop using the_repository in enter_repo()
Stop using `the_repository` in `enter_repo()` and instead accept the repository as a parameter. The injection of `the_repository` is thus bumped one level higher, where callers now pass it in explicitly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
920dba4581
commit
ea1d0f886d
4
setup.c
4
setup.c
@@ -1765,7 +1765,7 @@ enum discovery_result discover_git_directory_reason(struct strbuf *commondir,
|
||||
return result;
|
||||
}
|
||||
|
||||
const char *enter_repo(const char *path, unsigned flags)
|
||||
const char *enter_repo(struct repository *repo, const char *path, unsigned flags)
|
||||
{
|
||||
static struct strbuf validated_path = STRBUF_INIT;
|
||||
static struct strbuf used_path = STRBUF_INIT;
|
||||
@@ -1838,7 +1838,7 @@ const char *enter_repo(const char *path, unsigned flags)
|
||||
}
|
||||
|
||||
if (is_git_directory(".")) {
|
||||
set_git_dir(the_repository, ".", 0);
|
||||
set_git_dir(repo, ".", 0);
|
||||
check_repository_format(NULL);
|
||||
return path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user