aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/fast-import.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-02-07 12:03:32 +0100
committerJunio C Hamano <gitster@pobox.com>2025-02-07 09:59:22 -0800
commitbba59f58a4eeda6fafaa3d41e14f3d00a179923f (patch)
tree51f269e242c52072952c7c35b7ddd2e3df912b28 /builtin/fast-import.c
parentpath: drop unused `strbuf_git_path()` function (diff)
downloadgit-bba59f58a4eeda6fafaa3d41e14f3d00a179923f.tar.gz
git-bba59f58a4eeda6fafaa3d41e14f3d00a179923f.zip
path: drop `git_pathdup()` in favor of `repo_git_path()`
Remove `git_pathdup()` in favor of `repo_git_path()`. The latter does essentially the same, with the only exception that it does not rely on `the_repository` but takes the repo as separate parameter. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fast-import.c')
-rw-r--r--builtin/fast-import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/fast-import.c b/builtin/fast-import.c
index a6a84058cd..c6f5147e8b 100644
--- a/builtin/fast-import.c
+++ b/builtin/fast-import.c
@@ -328,7 +328,7 @@ static void write_branch_report(FILE *rpt, struct branch *b)
static void write_crash_report(const char *err)
{
- char *loc = git_pathdup("fast_import_crash_%"PRIuMAX, (uintmax_t) getpid());
+ char *loc = repo_git_path(the_repository, "fast_import_crash_%"PRIuMAX, (uintmax_t) getpid());
FILE *rpt = fopen(loc, "w");
struct branch *b;
unsigned long lu;
@@ -3280,7 +3280,7 @@ static char* make_fast_import_path(const char *path)
{
if (!relative_marks_paths || is_absolute_path(path))
return prefix_filename(global_prefix, path);
- return git_pathdup("info/fast-import/%s", path);
+ return repo_git_path(the_repository, "info/fast-import/%s", path);
}
static void option_import_marks(const char *marks,