diff options
author | Russell Belfer <rb@github.com> | 2014-02-21 09:14:16 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-04-01 09:45:20 -0700 |
commit | 18234b14ad55157581ca26ec763afc1af3ec6e76 (patch) | |
tree | 0093ff2001a591cf08116d61fa57c912f4c26d3b /src/refdb_fs.c | |
parent | 2450d4c63a58958100d1be0e5082efa930e09650 (diff) | |
download | libgit2-18234b14ad55157581ca26ec763afc1af3ec6e76.tar.gz |
Add efficient git_buf join3 API
There are a few places where we need to join three strings to
assemble a path. This adds a simple join3 function to avoid the
comparatively expensive join_n (which calls strlen on each string
twice).
Diffstat (limited to 'src/refdb_fs.c')
-rw-r--r-- | src/refdb_fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c index 9120a3e87..2550b7e26 100644 --- a/src/refdb_fs.c +++ b/src/refdb_fs.c @@ -1432,7 +1432,7 @@ static int create_new_reflog_file(const char *filepath) GIT_INLINE(int) retrieve_reflog_path(git_buf *path, git_repository *repo, const char *name) { - return git_buf_join_n(path, '/', 3, repo->path_repository, GIT_REFLOG_DIR, name); + return git_buf_join3(path, '/', repo->path_repository, GIT_REFLOG_DIR, name); } static int refdb_reflog_fs__ensure_log(git_refdb_backend *_backend, const char *name) |