summaryrefslogtreecommitdiff
path: root/src/diff_driver.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-12-27 13:47:34 -0600
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-22 22:30:35 +0000
commitf673e232afe22eb865cdc915e55a2df6493f0fbb (patch)
treee79e3e6fb1e1d78367679aea75e66c8141b4daa8 /src/diff_driver.c
parent647dfdb42d06514a85c1499f1be88a32b8a4c24b (diff)
downloadlibgit2-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/diff_driver.c')
-rw-r--r--src/diff_driver.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/diff_driver.c b/src/diff_driver.c
index 31bb5a9af..05246dfa3 100644
--- a/src/diff_driver.c
+++ b/src/diff_driver.c
@@ -149,7 +149,7 @@ static git_diff_driver_registry *git_repository_driver_registry(
}
if (!repo->diff_drivers)
- giterr_set(GITERR_REPOSITORY, "unable to create diff driver registry");
+ git_error_set(GIT_ERROR_REPOSITORY, "unable to create diff driver registry");
return repo->diff_drivers;
}
@@ -162,11 +162,11 @@ static int diff_driver_alloc(
namelen = strlen(name),
alloclen;
- GITERR_CHECK_ALLOC_ADD(&alloclen, driverlen, namelen);
- GITERR_CHECK_ALLOC_ADD(&alloclen, alloclen, 1);
+ GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, driverlen, namelen);
+ GIT_ERROR_CHECK_ALLOC_ADD(&alloclen, alloclen, 1);
driver = git__calloc(1, alloclen);
- GITERR_CHECK_ALLOC(driver);
+ GIT_ERROR_CHECK_ALLOC(driver);
memcpy(driver->name, name, namelen);
@@ -211,7 +211,7 @@ static int git_diff_driver_builtin(
(error = p_regcomp(
&drv->word_pattern, ddef->words, ddef->flags | REG_EXTENDED)))
{
- error = giterr_set_regex(&drv->word_pattern, error);
+ error = git_error_set_regex(&drv->word_pattern, error);
goto done;
}
@@ -256,7 +256,7 @@ static int git_diff_driver_load(
/* if you can't read config for repo, just use default driver */
if (git_repository_config_snapshot(&cfg, repo) < 0) {
- giterr_clear();
+ git_error_clear();
goto done;
}
@@ -287,7 +287,7 @@ static int git_diff_driver_load(
cfg, name.ptr, NULL, diff_driver_xfuncname, drv)) < 0) {
if (error != GIT_ENOTFOUND)
goto done;
- giterr_clear(); /* no diff.<driver>.xfuncname, so just continue */
+ git_error_clear(); /* no diff.<driver>.xfuncname, so just continue */
}
git_buf_truncate(&name, namelen + strlen("diff.."));
@@ -296,7 +296,7 @@ static int git_diff_driver_load(
cfg, name.ptr, NULL, diff_driver_funcname, drv)) < 0) {
if (error != GIT_ENOTFOUND)
goto done;
- giterr_clear(); /* no diff.<driver>.funcname, so just continue */
+ git_error_clear(); /* no diff.<driver>.funcname, so just continue */
}
/* if we found any patterns, set driver type to use correct callback */
@@ -315,7 +315,7 @@ static int git_diff_driver_load(
found_driver = true;
else {
/* TODO: warn about bad regex instead of failure */
- error = giterr_set_regex(&drv->word_pattern, error);
+ error = git_error_set_regex(&drv->word_pattern, error);
goto done;
}
@@ -379,7 +379,7 @@ int git_diff_driver_lookup(
else if ((error = git_diff_driver_load(out, repo, values[0])) < 0) {
if (error == GIT_ENOTFOUND) {
error = 0;
- giterr_clear();
+ git_error_clear();
}
}