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/transports/smart.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/transports/smart.c')
-rw-r--r-- | src/transports/smart.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/transports/smart.c b/src/transports/smart.c index 9fcbdcf21..fd7113c7e 100644 --- a/src/transports/smart.c +++ b/src/transports/smart.c @@ -139,11 +139,11 @@ static int git_smart__set_custom_headers( for (i = 0; i < custom_headers->count; i++) { if (is_malformed_http_header(custom_headers->strings[i])) { - giterr_set(GITERR_INVALID, "custom HTTP header '%s' is malformed", custom_headers->strings[i]); + git_error_set(GIT_ERROR_INVALID, "custom HTTP header '%s' is malformed", custom_headers->strings[i]); return -1; } if (is_forbidden_custom_header(custom_headers->strings[i])) { - giterr_set(GITERR_INVALID, "custom HTTP header '%s' is already set by libgit2", custom_headers->strings[i]); + git_error_set(GIT_ERROR_INVALID, "custom HTTP header '%s' is already set by libgit2", custom_headers->strings[i]); return -1; } } @@ -224,7 +224,7 @@ static int git_smart__connect( return -1; t->url = git__strdup(url); - GITERR_CHECK_ALLOC(t->url); + GIT_ERROR_CHECK_ALLOC(t->url); if (git_proxy_options_dup(&t->proxy, proxy) < 0) return -1; @@ -239,7 +239,7 @@ static int git_smart__connect( else if (GIT_DIRECTION_PUSH == t->direction) service = GIT_SERVICE_RECEIVEPACK_LS; else { - giterr_set(GITERR_NET, "invalid direction"); + git_error_set(GIT_ERROR_NET, "invalid direction"); return -1; } @@ -260,7 +260,7 @@ static int git_smart__connect( pkt = (git_pkt *)git_vector_get(&t->refs, 0); if (!pkt || GIT_PKT_COMMENT != pkt->type) { - giterr_set(GITERR_NET, "invalid response"); + git_error_set(GIT_ERROR_NET, "invalid response"); return -1; } else { /* Remove the comment pkt from the list */ @@ -274,7 +274,7 @@ static int git_smart__connect( pkt = (git_pkt *)git_vector_get(&t->refs, 0); if (pkt && GIT_PKT_REF != pkt->type) { - giterr_set(GITERR_NET, "invalid response"); + git_error_set(GIT_ERROR_NET, "invalid response"); return -1; } first = (git_pkt_ref *)pkt; @@ -297,7 +297,7 @@ static int git_smart__connect( /* There was no ref packet received, or the cap list was empty */ error = 0; } else { - giterr_set(GITERR_NET, "invalid response"); + git_error_set(GIT_ERROR_NET, "invalid response"); goto cleanup; } @@ -318,7 +318,7 @@ static int git_smart__ls(const git_remote_head ***out, size_t *size, git_transpo transport_smart *t = (transport_smart *)transport; if (!t->have_refs) { - giterr_set(GITERR_NET, "the transport has not yet loaded the refs"); + git_error_set(GIT_ERROR_NET, "the transport has not yet loaded the refs"); return -1; } @@ -338,7 +338,7 @@ int git_smart__negotiation_step(git_transport *transport, void *data, size_t len return -1; if (GIT_DIRECTION_FETCH != t->direction) { - giterr_set(GITERR_NET, "this operation is only valid for fetch"); + git_error_set(GIT_ERROR_NET, "this operation is only valid for fetch"); return -1; } @@ -367,7 +367,7 @@ int git_smart__get_push_stream(transport_smart *t, git_smart_subtransport_stream return -1; if (GIT_DIRECTION_PUSH != t->direction) { - giterr_set(GITERR_NET, "this operation is only valid for push"); + git_error_set(GIT_ERROR_NET, "this operation is only valid for push"); return -1; } @@ -516,7 +516,7 @@ int git_transport_smart(git_transport **out, git_remote *owner, void *param) return -1; t = git__calloc(1, sizeof(transport_smart)); - GITERR_CHECK_ALLOC(t); + GIT_ERROR_CHECK_ALLOC(t); t->parent.version = GIT_TRANSPORT_VERSION; t->parent.set_callbacks = git_smart__set_callbacks; |