aboutsummaryrefslogtreecommitdiffstats
path: root/object-file.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-04-15 11:38:14 +0200
committerJunio C Hamano <gitster@pobox.com>2025-04-15 08:24:34 -0700
commitd1fa670de07ec9d08fc1333b3addf746c7d304e2 (patch)
treed8f8e7b3edbddb66ed00a787e79594003cfed847 /object-file.h
parent0dfca9888191bcea4fa00fb3c7abda787e06cf75 (diff)
downloadgit-d1fa670de07ec9d08fc1333b3addf746c7d304e2.tar.gz
object-file: move `mkdir_in_gitdir()` into "path.c"
The `mkdir_in_gitdir()` function is similar to `safe_create_dir()`, but the former is hosted in "object-file.c" whereas the latter is hosted in "path.c". The latter code unit makes way more sense though as the logic has nothing to do with object files in particular. Move the file into "path.c". While at it, we: - Rename the function to `safe_create_dir_in_gitdir()` so that the function names are similar to one another. - Remove the dependency on `the_repository` by making the callers pass the repository instead. Adjust callers accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.h')
-rw-r--r--object-file.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/object-file.h b/object-file.h
index 81b30d269c..4649a3f37d 100644
--- a/object-file.h
+++ b/object-file.h
@@ -54,8 +54,6 @@ enum scld_error safe_create_leading_directories(char *path);
enum scld_error safe_create_leading_directories_const(const char *path);
enum scld_error safe_create_leading_directories_no_share(char *path);
-int mkdir_in_gitdir(const char *path);
-
int git_open_cloexec(const char *name, int flags);
#define git_open(name) git_open_cloexec(name, O_RDONLY)