diff options
Diffstat (limited to 'src/attr.c')
-rw-r--r-- | src/attr.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/attr.c b/src/attr.c index 95b49e3de..5849e701f 100644 --- a/src/attr.c +++ b/src/attr.c @@ -338,7 +338,7 @@ GIT_INLINE(int) preload_attr_file( } static int system_attr_file( - git_buf *out, + git_str *out, git_attr_session *attr_session) { int error; @@ -366,11 +366,11 @@ static int system_attr_file( if (attr_session->sysdir.size == 0) return GIT_ENOTFOUND; - /* We can safely provide a git_buf with no allocation (asize == 0) to - * a consumer. This allows them to treat this as a regular `git_buf`, - * but their call to `git_buf_dispose` will not attempt to free it. + /* We can safely provide a git_str with no allocation (asize == 0) to + * a consumer. This allows them to treat this as a regular `git_str`, + * but their call to `git_str_dispose` will not attempt to free it. */ - git_buf_attach_notowned( + git_str_attach_notowned( out, attr_session->sysdir.ptr, attr_session->sysdir.size); return 0; } @@ -380,7 +380,7 @@ static int attr_setup( git_attr_session *attr_session, git_attr_options *opts) { - git_buf system = GIT_BUF_INIT, info = GIT_BUF_INIT; + git_str system = GIT_STR_INIT, info = GIT_STR_INIT; git_attr_file_source index_source = { GIT_ATTR_FILE_SOURCE_INDEX, NULL, GIT_ATTR_FILE, NULL }; git_attr_file_source head_source = { GIT_ATTR_FILE_SOURCE_HEAD, NULL, GIT_ATTR_FILE, NULL }; git_attr_file_source commit_source = { GIT_ATTR_FILE_SOURCE_COMMIT, NULL, GIT_ATTR_FILE, NULL }; @@ -411,7 +411,7 @@ static int attr_setup( git_repository_attr_cache(repo)->cfg_attr_file)) < 0) goto out; - if ((error = git_repository_item_path(&info, repo, GIT_REPOSITORY_ITEM_INFO)) < 0 || + if ((error = git_repository__item_path(&info, repo, GIT_REPOSITORY_ITEM_INFO)) < 0 || (error = preload_attr_file(repo, attr_session, info.ptr, GIT_ATTR_FILE_INREPO)) < 0) { if (error != GIT_ENOTFOUND) goto out; @@ -447,8 +447,8 @@ static int attr_setup( attr_session->init_setup = 1; out: - git_buf_dispose(&system); - git_buf_dispose(&info); + git_str_dispose(&system); + git_str_dispose(&info); return error; } @@ -625,7 +625,7 @@ static int collect_attr_files( git_vector *files) { int error = 0; - git_buf dir = GIT_BUF_INIT, attrfile = GIT_BUF_INIT; + git_str dir = GIT_STR_INIT, attrfile = GIT_STR_INIT; const char *workdir = git_repository_workdir(repo); attr_walk_up_info info = { NULL }; @@ -653,7 +653,7 @@ static int collect_attr_files( * - $GIT_PREFIX/etc/gitattributes */ - if ((error = git_repository_item_path(&attrfile, repo, GIT_REPOSITORY_ITEM_INFO)) < 0 || + if ((error = git_repository__item_path(&attrfile, repo, GIT_REPOSITORY_ITEM_INFO)) < 0 || (error = push_attr_file(repo, attr_session, files, attrfile.ptr, GIT_ATTR_FILE_INREPO)) < 0) { if (error != GIT_ENOTFOUND) goto cleanup; @@ -693,8 +693,8 @@ static int collect_attr_files( cleanup: if (error < 0) release_attr_files(files); - git_buf_dispose(&attrfile); - git_buf_dispose(&dir); + git_str_dispose(&attrfile); + git_str_dispose(&dir); return error; } |