summaryrefslogtreecommitdiff
path: root/tests/refs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/refs')
-rw-r--r--tests/refs/branches/move.c6
-rw-r--r--tests/refs/branches/remote.c12
-rw-r--r--tests/refs/branches/upstream.c2
-rw-r--r--tests/refs/lookup.c2
-rw-r--r--tests/refs/reflog/reflog.c4
5 files changed, 13 insertions, 13 deletions
diff --git a/tests/refs/branches/move.c b/tests/refs/branches/move.c
index acd8661b8..2cba9dfd3 100644
--- a/tests/refs/branches/move.c
+++ b/tests/refs/branches/move.c
@@ -84,7 +84,7 @@ void test_refs_branches_move__can_not_move_a_branch_if_its_destination_name_coll
cl_assert_equal_i(GIT_EEXISTS,
git_branch_move(&new_ref, original_ref, "master", 0));
- cl_assert(giterr_last()->message != NULL);
+ cl_assert(git_error_last()->message != NULL);
cl_git_pass(git_repository_config_snapshot(&config, repo));
cl_git_pass(git_config_get_string(&str, config, "branch.master.remote"));
@@ -96,7 +96,7 @@ void test_refs_branches_move__can_not_move_a_branch_if_its_destination_name_coll
cl_assert_equal_i(GIT_EEXISTS,
git_branch_move(&new_ref, original_ref, "cannot-fetch", 0));
- cl_assert(giterr_last()->message != NULL);
+ cl_assert(git_error_last()->message != NULL);
cl_git_pass(git_repository_config_snapshot(&config, repo));
cl_git_pass(git_config_get_string(&str, config, "branch.master.remote"));
@@ -111,7 +111,7 @@ void test_refs_branches_move__can_not_move_a_branch_if_its_destination_name_coll
cl_assert_equal_i(GIT_EEXISTS,
git_branch_move(&new_ref, original_ref, "master", 0));
- cl_assert(giterr_last()->message != NULL);
+ cl_assert(git_error_last()->message != NULL);
cl_git_pass(git_repository_config_snapshot(&config, repo));
cl_git_pass(git_config_get_string(&str, config, "branch.master.remote"));
diff --git a/tests/refs/branches/remote.c b/tests/refs/branches/remote.c
index ac428abcb..27a3b0c44 100644
--- a/tests/refs/branches/remote.c
+++ b/tests/refs/branches/remote.c
@@ -34,10 +34,10 @@ void test_refs_branches_remote__no_matching_remote_returns_error(void)
const char *unknown = "refs/remotes/nonexistent/master";
git_buf buf;
- giterr_clear();
+ git_error_clear();
memset(&buf, 0, sizeof(git_buf));
cl_git_fail_with(git_branch_remote_name(&buf, g_repo, unknown), GIT_ENOTFOUND);
- cl_assert(giterr_last() != NULL);
+ cl_assert(git_error_last() != NULL);
}
void test_refs_branches_remote__local_remote_returns_error(void)
@@ -45,10 +45,10 @@ void test_refs_branches_remote__local_remote_returns_error(void)
const char *local = "refs/heads/master";
git_buf buf;
- giterr_clear();
+ git_error_clear();
memset(&buf, 0, sizeof(git_buf));
cl_git_fail_with(git_branch_remote_name(&buf, g_repo, local), GIT_ERROR);
- cl_assert(giterr_last() != NULL);
+ cl_assert(git_error_last() != NULL);
}
void test_refs_branches_remote__ambiguous_remote_returns_error(void)
@@ -61,8 +61,8 @@ void test_refs_branches_remote__ambiguous_remote_returns_error(void)
git_remote_free(remote);
- giterr_clear();
+ git_error_clear();
memset(&buf, 0, sizeof(git_buf));
cl_git_fail_with(git_branch_remote_name(&buf, g_repo, remote_tracking_branch_name), GIT_EAMBIGUOUS);
- cl_assert(giterr_last() != NULL);
+ cl_assert(git_error_last() != NULL);
}
diff --git a/tests/refs/branches/upstream.c b/tests/refs/branches/upstream.c
index 176f2a509..928a9ff7b 100644
--- a/tests/refs/branches/upstream.c
+++ b/tests/refs/branches/upstream.c
@@ -176,7 +176,7 @@ void test_refs_branches_upstream__no_fetch_refspec(void)
cl_git_pass(git_reference_create(&ref, repo, "refs/remotes/matching/master", git_reference_target(branch), 1, "fetch"));
cl_git_fail(git_branch_set_upstream(branch, "matching/master"));
cl_assert_equal_s("could not determine remote for 'refs/remotes/matching/master'",
- giterr_last()->message);
+ git_error_last()->message);
/* we can't set it automatically, so let's test the user setting it by hand */
cl_git_pass(git_repository_config(&cfg, repo));
diff --git a/tests/refs/lookup.c b/tests/refs/lookup.c
index 456d0d2a8..01e956de2 100644
--- a/tests/refs/lookup.c
+++ b/tests/refs/lookup.c
@@ -64,5 +64,5 @@ void test_refs_lookup__dwim_notfound(void)
git_reference *ref;
cl_git_fail_with(GIT_ENOTFOUND, git_reference_dwim(&ref, g_repo, "idontexist"));
- cl_assert_equal_s("no reference found for shorthand 'idontexist'", giterr_last()->message);
+ cl_assert_equal_s("no reference found for shorthand 'idontexist'", git_error_last()->message);
}
diff --git a/tests/refs/reflog/reflog.c b/tests/refs/reflog/reflog.c
index 3a6c97c44..cf8c5c2d3 100644
--- a/tests/refs/reflog/reflog.c
+++ b/tests/refs/reflog/reflog.c
@@ -253,11 +253,11 @@ void test_refs_reflog_reflog__reading_a_reflog_with_invalid_format_returns_error
cl_assert(strstr(git_buf_cstr(&logcontents), "Reflog\nmessage") != NULL);
/* clear the error state so we can capture the error generated by git_reflog_read */
- giterr_clear();
+ git_error_clear();
cl_git_fail(git_reflog_read(&reflog, g_repo, refname));
- error = giterr_last();
+ error = git_error_last();
cl_assert(error != NULL);
cl_assert_equal_s("unable to parse OID - contains invalid characters", error->message);