Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-04-21 00:09:09 +0300
committerJunio C Hamano <gitster@pobox.com>2017-04-21 07:04:15 +0300
commitd9c69644b27eb59fe16c1931580e6fce4abbdc65 (patch)
tree71ecd47a9565debbbfe144c4f3edfe631f905f07 /fast-import.c
parentca03e0670c3ba71400b0f5ed199b045481efdb1e (diff)
replace xstrdup(git_path(...)) with git_pathdup(...)
It's more efficient to use git_pathdup(), as it skips an extra copy of the path. And by removing some calls to git_path(), it makes it easier to audit for dangerous uses. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index 4d5a7f58d0..d2ef8a8729 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -3203,7 +3203,7 @@ static char* make_fast_import_path(const char *path)
{
if (!relative_marks_paths || is_absolute_path(path))
return xstrdup(path);
- return xstrdup(git_path("info/fast-import/%s", path));
+ return git_pathdup("info/fast-import/%s", path);
}
static void option_import_marks(const char *marks,