aboutsummaryrefslogtreecommitdiff
path: root/path.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-11-19 08:50:49 +0100
committerJunio C Hamano <gitster@pobox.com>2025-11-19 17:41:03 -0800
commit831e02340b9de46c9ea0a1bbce3894f390f5a45e (patch)
tree2277541bc28b371ed41ef8538b6ea60f85aa33f8 /path.h
parentc6def6a05504575dc92f8be785f18e326ea5f23c (diff)
downloadgit-831e02340b9de46c9ea0a1bbce3894f390f5a45e.tar.xz
path: move `enter_repo()` into "setup.c"
The function `enter_repo()` is used to enter a repository at a given path. As such it sits way closer to setting up a repository than it does with handling paths, but regardless of that it's located in "path.c" instead of in "setup.c". Move the function into "setup.c". Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'path.h')
-rw-r--r--path.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/path.h b/path.h
index e67348f253..0ec95a0b07 100644
--- a/path.h
+++ b/path.h
@@ -146,21 +146,6 @@ int adjust_shared_perm(struct repository *repo, const char *path);
char *interpolate_path(const char *path, int real_home);
-/* The bits are as follows:
- *
- * - ENTER_REPO_STRICT: callers that require exact paths (as opposed
- * to allowing known suffixes like ".git", ".git/.git" to be
- * omitted) can set this bit.
- *
- * - ENTER_REPO_ANY_OWNER_OK: callers that are willing to run without
- * ownership check can set this bit.
- */
-enum {
- ENTER_REPO_STRICT = (1<<0),
- ENTER_REPO_ANY_OWNER_OK = (1<<1),
-};
-
-const char *enter_repo(const char *path, unsigned flags);
const char *remove_leading_path(const char *in, const char *prefix);
const char *relative_path(const char *in, const char *prefix, struct strbuf *sb);
int normalize_path_copy_len(char *dst, const char *src, int *prefix_len);