Skip to content

Commit aaa2680

Browse files
pcloudsgitster
authored andcommitted
fast-import: use git_path() for accessing .git dir instead of get_git_dir()
This allows git_path() to redirect info/fast-import to another place if needed Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 1fdc2ab commit aaa2680

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fast-import.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,12 +3112,9 @@ static void parse_progress(void)
31123112

31133113
static char* make_fast_import_path(const char *path)
31143114
{
3115-
struct strbuf abs_path = STRBUF_INIT;
3116-
31173115
if (!relative_marks_paths || is_absolute_path(path))
31183116
return xstrdup(path);
3119-
strbuf_addf(&abs_path, "%s/info/fast-import/%s", get_git_dir(), path);
3120-
return strbuf_detach(&abs_path, NULL);
3117+
return xstrdup(git_path("info/fast-import/%s", path));
31213118
}
31223119

31233120
static void option_import_marks(const char *marks,

0 commit comments

Comments
 (0)