]> git.ipfire.org Git - thirdparty/git.git/commit
object-file: move `mkdir_in_gitdir()` into "path.c"
authorPatrick Steinhardt <ps@pks.im>
Tue, 15 Apr 2025 09:38:14 +0000 (11:38 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 15 Apr 2025 15:24:34 +0000 (08:24 -0700)
commitd1fa670de07ec9d08fc1333b3addf746c7d304e2
treed8f8e7b3edbddb66ed00a787e79594003cfed847
parent0dfca9888191bcea4fa00fb3c7abda787e06cf75
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>
builtin/rebase.c
object-file.c
object-file.h
path.c
path.h
rerere.c