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>
This commit is contained in:

committed by
Junio C Hamano

parent
7f17900b5b
commit
bba59f58a4
@ -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,
|
||||
|
Reference in New Issue
Block a user