summaryrefslogtreecommitdiffstats
path: root/setup.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-12 13:29:54 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-12 19:15:41 +0200
commita52beae3a319e8133be0fe245e5fb3b9e7d8d9fb (patch)
treef130e8073622c4abd7bdb048c9102520856dbf7d /setup.h
parentenvironment: make `get_git_namespace()` self-contained (diff)
downloadgit-a52beae3a319e8133be0fe245e5fb3b9e7d8d9fb.tar.xz
git-a52beae3a319e8133be0fe245e5fb3b9e7d8d9fb.zip
environment: move `set_git_dir()` and related into setup layer
The functions `set_git_dir()` and friends are used to set up repositories. As such, they are quite clearly part of the setup subsystem, but still live in "environment.c". Move them over, which also helps to get rid of dependencies on `the_repository` in the environment subsystem. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r--setup.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/setup.h b/setup.h
index fd2df7cd52..e496ab3e4d 100644
--- a/setup.h
+++ b/setup.h
@@ -94,6 +94,9 @@ static inline int discover_git_directory(struct strbuf *commondir,
return 0;
}
+void set_git_dir(const char *path, int make_realpath);
+void set_git_work_tree(const char *tree);
+
const char *setup_git_directory_gently(int *);
const char *setup_git_directory(void);
char *prefix_path(const char *prefix, int len, const char *path);