vendor/libgit2/src/signature.c in rugged-0.27.9 vs vendor/libgit2/src/signature.c in rugged-0.27.10
- old
+ new
@@ -23,11 +23,11 @@
git__free(sig);
}
static int signature_error(const char *msg)
{
- giterr_set(GITERR_INVALID, "failed to parse signature - %s", msg);
+ git_error_set(GIT_ERROR_INVALID, "failed to parse signature - %s", msg);
return -1;
}
static bool contains_angle_brackets(const char *input)
{
@@ -74,16 +74,16 @@
return signature_error(
"Neither `name` nor `email` should contain angle brackets chars.");
}
p = git__calloc(1, sizeof(git_signature));
- GITERR_CHECK_ALLOC(p);
+ GIT_ERROR_CHECK_ALLOC(p);
p->name = extract_trimmed(name, strlen(name));
- GITERR_CHECK_ALLOC(p->name);
+ GIT_ERROR_CHECK_ALLOC(p->name);
p->email = extract_trimmed(email, strlen(email));
- GITERR_CHECK_ALLOC(p->email);
+ GIT_ERROR_CHECK_ALLOC(p->email);
if (p->name[0] == '\0' || p->email[0] == '\0') {
git_signature_free(p);
return signature_error("Signature cannot have an empty name or email");
}
@@ -102,17 +102,17 @@
if (source == NULL)
return 0;
signature = git__calloc(1, sizeof(git_signature));
- GITERR_CHECK_ALLOC(signature);
+ GIT_ERROR_CHECK_ALLOC(signature);
signature->name = git__strdup(source->name);
- GITERR_CHECK_ALLOC(signature->name);
+ GIT_ERROR_CHECK_ALLOC(signature->name);
signature->email = git__strdup(source->email);
- GITERR_CHECK_ALLOC(signature->email);
+ GIT_ERROR_CHECK_ALLOC(signature->email);
signature->when.time = source->when.time;
signature->when.offset = source->when.offset;
signature->when.sign = source->when.sign;
@@ -127,17 +127,17 @@
if (source == NULL)
return 0;
signature = git_pool_mallocz(pool, sizeof(git_signature));
- GITERR_CHECK_ALLOC(signature);
+ GIT_ERROR_CHECK_ALLOC(signature);
signature->name = git_pool_strdup(pool, source->name);
- GITERR_CHECK_ALLOC(signature->name);
+ GIT_ERROR_CHECK_ALLOC(signature->name);
signature->email = git_pool_strdup(pool, source->email);
- GITERR_CHECK_ALLOC(signature->email);
+ GIT_ERROR_CHECK_ALLOC(signature->email);
signature->when.time = source->when.time;
signature->when.offset = source->when.offset;
signature->when.sign = source->when.sign;
@@ -282,10 +282,10 @@
assert(out && buf);
*out = NULL;
sig = git__calloc(1, sizeof(git_signature));
- GITERR_CHECK_ALLOC(sig);
+ GIT_ERROR_CHECK_ALLOC(sig);
buf_end = buf + strlen(buf);
error = git_signature__parse(sig, &buf, buf_end, NULL, '\0');
if (error)