diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2018-12-27 13:47:34 -0600 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-22 22:30:35 +0000 |
| commit | f673e232afe22eb865cdc915e55a2df6493f0fbb (patch) | |
| tree | e79e3e6fb1e1d78367679aea75e66c8141b4daa8 /src/blob.c | |
| parent | 647dfdb42d06514a85c1499f1be88a32b8a4c24b (diff) | |
| download | libgit2-f673e232afe22eb865cdc915e55a2df6493f0fbb.tar.gz | |
git_error: use new names in internal APIs and usage
Move to the `git_error` name in the internal API for error-related
functions.
Diffstat (limited to 'src/blob.c')
| -rw-r--r-- | src/blob.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/blob.c b/src/blob.c index ef8a004ae..79748af22 100644 --- a/src/blob.c +++ b/src/blob.c @@ -116,7 +116,7 @@ static int write_file_stream( p_close(fd); if (written != file_size || read_len < 0) { - giterr_set(GITERR_OS, "failed to read file into stream"); + git_error_set(GIT_ERROR_OS, "failed to read file into stream"); error = -1; } @@ -158,11 +158,11 @@ static int write_symlink( int error; link_data = git__malloc(link_size); - GITERR_CHECK_ALLOC(link_data); + GIT_ERROR_CHECK_ALLOC(link_data); read_len = p_readlink(path, link_data, link_size); if (read_len != (ssize_t)link_size) { - giterr_set(GITERR_OS, "failed to create blob: cannot read symlink '%s'", path); + git_error_set(GIT_ERROR_OS, "failed to create blob: cannot read symlink '%s'", path); git__free(link_data); return -1; } @@ -206,7 +206,7 @@ int git_blob__create_from_paths( goto done; if (S_ISDIR(st.st_mode)) { - giterr_set(GITERR_ODB, "cannot create blob from '%s': it is a directory", content_path); + git_error_set(GIT_ERROR_ODB, "cannot create blob from '%s': it is a directory", content_path); error = GIT_EDIRECTORY; goto done; } @@ -334,11 +334,11 @@ int git_blob_create_fromstream(git_writestream **out, git_repository *repo, cons assert(out && repo); stream = git__calloc(1, sizeof(blob_writestream)); - GITERR_CHECK_ALLOC(stream); + GIT_ERROR_CHECK_ALLOC(stream); if (hintpath) { stream->hintpath = git__strdup(hintpath); - GITERR_CHECK_ALLOC(stream->hintpath); + GIT_ERROR_CHECK_ALLOC(stream->hintpath); } stream->repo = repo; |
