Skip to content

Commit

Permalink
fast-import: use git_path() for accessing .git dir instead of get_git…
Browse files Browse the repository at this point in the history
…_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>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Dec 1, 2014
1 parent 1fdc2ab commit aaa2680
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fast-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -3112,12 +3112,9 @@ static void parse_progress(void)

static char* make_fast_import_path(const char *path)
{
struct strbuf abs_path = STRBUF_INIT;

if (!relative_marks_paths || is_absolute_path(path))
return xstrdup(path);
strbuf_addf(&abs_path, "%s/info/fast-import/%s", get_git_dir(), path);
return strbuf_detach(&abs_path, NULL);
return xstrdup(git_path("info/fast-import/%s", path));
}

static void option_import_marks(const char *marks,
Expand Down

0 comments on commit aaa2680

Please sign in to comment.