summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-07-13 11:50:46 +0700
committerJunio C Hamano <gitster@pobox.com>2014-07-13 18:26:54 -0700
commit130f6f491afef3c10ed4fbe65d34d4faee6ef206 (patch)
treed0eb541bb3bd9433f861ffb10d83efb0e51e4191
parent4127719f656a3bcaad127cd84d2b5f37710bedab (diff)
downloadgit-130f6f491afef3c10ed4fbe65d34d4faee6ef206.tar.gz
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>
-rw-r--r--fast-import.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fast-import.c b/fast-import.c
index d9c068b1d3..ea426c4c0c 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -3103,12 +3103,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,