summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-02-21 10:33:30 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-02-22 11:25:14 +0000
commita1ef995dc03379fb1f5151b5d98d16644218c95e (patch)
treef209958f5f27dfbe3dc2da296c801563a348cce4 /tests
parent975d6722a5c203427ab63789d329c00b76461225 (diff)
downloadlibgit2-a1ef995dc03379fb1f5151b5d98d16644218c95e.tar.gz
indexer: use git_indexer_progress throughout
Update internal usage of `git_transfer_progress` to `git_indexer_progreses`.
Diffstat (limited to 'tests')
-rw-r--r--tests/clone/nonetwork.c2
-rw-r--r--tests/network/fetchlocal.c2
-rw-r--r--tests/online/clone.c4
-rw-r--r--tests/online/fetch.c10
-rw-r--r--tests/pack/indexer.c14
-rw-r--r--tests/pack/packbuilder.c6
6 files changed, 19 insertions, 19 deletions
diff --git a/tests/clone/nonetwork.c b/tests/clone/nonetwork.c
index 8a8337c04..73528e578 100644
--- a/tests/clone/nonetwork.c
+++ b/tests/clone/nonetwork.c
@@ -171,7 +171,7 @@ void test_clone_nonetwork__can_checkout_given_branch(void)
}
static int clone_cancel_fetch_transfer_progress_cb(
- const git_transfer_progress *stats, void *data)
+ const git_indexer_progress *stats, void *data)
{
GIT_UNUSED(stats); GIT_UNUSED(data);
return -54321;
diff --git a/tests/network/fetchlocal.c b/tests/network/fetchlocal.c
index bedbcf9e8..6bc28265b 100644
--- a/tests/network/fetchlocal.c
+++ b/tests/network/fetchlocal.c
@@ -8,7 +8,7 @@ static const char* tagger_name = "Vicent Marti";
static const char* tagger_email = "vicent@github.com";
static const char* tagger_message = "This is my tag.\n\nThere are many tags, but this one is mine\n";
-static int transfer_cb(const git_transfer_progress *stats, void *payload)
+static int transfer_cb(const git_indexer_progress *stats, void *payload)
{
int *callcount = (int*)payload;
GIT_UNUSED(stats);
diff --git a/tests/online/clone.c b/tests/online/clone.c
index 6fdbbbd01..faf8a0f87 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -158,7 +158,7 @@ static void checkout_progress(const char *path, size_t cur, size_t tot, void *pa
(*was_called) = true;
}
-static int fetch_progress(const git_transfer_progress *stats, void *payload)
+static int fetch_progress(const git_indexer_progress *stats, void *payload)
{
bool *was_called = (bool*)payload;
GIT_UNUSED(stats);
@@ -442,7 +442,7 @@ void test_online_clone__bitbucket_falls_back_to_specified_creds(void)
cl_fixture_cleanup("./foo");
}
-static int cancel_at_half(const git_transfer_progress *stats, void *payload)
+static int cancel_at_half(const git_indexer_progress *stats, void *payload)
{
GIT_UNUSED(payload);
diff --git a/tests/online/fetch.c b/tests/online/fetch.c
index 827cb23c1..f939a16b8 100644
--- a/tests/online/fetch.c
+++ b/tests/online/fetch.c
@@ -25,7 +25,7 @@ static int update_tips(const char *refname, const git_oid *a, const git_oid *b,
return 0;
}
-static int progress(const git_transfer_progress *stats, void *payload)
+static int progress(const git_indexer_progress *stats, void *payload)
{
size_t *bytes_received = (size_t *)payload;
*bytes_received = stats->received_bytes;
@@ -84,15 +84,15 @@ void test_online_fetch__fetch_twice(void)
cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH, NULL, NULL, NULL));
cl_git_pass(git_remote_download(remote, NULL, NULL));
git_remote_disconnect(remote);
-
+
git_remote_connect(remote, GIT_DIRECTION_FETCH, NULL, NULL, NULL);
cl_git_pass(git_remote_download(remote, NULL, NULL));
git_remote_disconnect(remote);
-
+
git_remote_free(remote);
}
-static int transferProgressCallback(const git_transfer_progress *stats, void *payload)
+static int transferProgressCallback(const git_indexer_progress *stats, void *payload)
{
bool *invoked = (bool *)payload;
@@ -134,7 +134,7 @@ void test_online_fetch__doesnt_retrieve_a_pack_when_the_repository_is_up_to_date
git_repository_free(_repository);
}
-static int cancel_at_half(const git_transfer_progress *stats, void *payload)
+static int cancel_at_half(const git_indexer_progress *stats, void *payload)
{
GIT_UNUSED(payload);
diff --git a/tests/pack/indexer.c b/tests/pack/indexer.c
index 3c4e1c1ee..08247ae46 100644
--- a/tests/pack/indexer.c
+++ b/tests/pack/indexer.c
@@ -98,7 +98,7 @@ static const unsigned int base_obj_len = 2;
void test_pack_indexer__out_of_order(void)
{
git_indexer *idx = 0;
- git_transfer_progress stats = { 0 };
+ git_indexer_progress stats = { 0 };
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
cl_git_pass(git_indexer_append(
@@ -115,7 +115,7 @@ void test_pack_indexer__out_of_order(void)
void test_pack_indexer__missing_trailer(void)
{
git_indexer *idx = 0;
- git_transfer_progress stats = { 0 };
+ git_indexer_progress stats = { 0 };
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
cl_git_pass(git_indexer_append(
@@ -131,7 +131,7 @@ void test_pack_indexer__missing_trailer(void)
void test_pack_indexer__leaky(void)
{
git_indexer *idx = 0;
- git_transfer_progress stats = { 0 };
+ git_indexer_progress stats = { 0 };
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
cl_git_pass(git_indexer_append(
@@ -147,7 +147,7 @@ void test_pack_indexer__leaky(void)
void test_pack_indexer__fix_thin(void)
{
git_indexer *idx = NULL;
- git_transfer_progress stats = { 0 };
+ git_indexer_progress stats = { 0 };
git_repository *repo;
git_odb *odb;
git_oid id, should_id;
@@ -213,7 +213,7 @@ void test_pack_indexer__fix_thin(void)
void test_pack_indexer__corrupt_length(void)
{
git_indexer *idx = NULL;
- git_transfer_progress stats = { 0 };
+ git_indexer_progress stats = { 0 };
git_repository *repo;
git_odb *odb;
git_oid id, should_id;
@@ -243,7 +243,7 @@ void test_pack_indexer__incomplete_pack_fails_with_strict(void)
{
git_indexer_options opts = GIT_INDEXER_OPTIONS_INIT;
git_indexer *idx = 0;
- git_transfer_progress stats = { 0 };
+ git_indexer_progress stats = { 0 };
opts.verify = 1;
@@ -263,7 +263,7 @@ void test_pack_indexer__out_of_order_with_connectivity_checks(void)
{
git_indexer_options opts = GIT_INDEXER_OPTIONS_INIT;
git_indexer *idx = 0;
- git_transfer_progress stats = { 0 };
+ git_indexer_progress stats = { 0 };
opts.verify = 1;
diff --git a/tests/pack/packbuilder.c b/tests/pack/packbuilder.c
index 394841e87..397d32e92 100644
--- a/tests/pack/packbuilder.c
+++ b/tests/pack/packbuilder.c
@@ -12,7 +12,7 @@ static git_packbuilder *_packbuilder;
static git_indexer *_indexer;
static git_vector _commits;
static int _commits_is_initialized;
-static git_transfer_progress _stats;
+static git_indexer_progress _stats;
extern bool git_disable_pack_keep_file_checks;
@@ -88,14 +88,14 @@ static void seed_packbuilder(void)
static int feed_indexer(void *ptr, size_t len, void *payload)
{
- git_transfer_progress *stats = (git_transfer_progress *)payload;
+ git_indexer_progress *stats = (git_indexer_progress *)payload;
return git_indexer_append(_indexer, ptr, len, stats);
}
void test_pack_packbuilder__create_pack(void)
{
- git_transfer_progress stats;
+ git_indexer_progress stats;
git_buf buf = GIT_BUF_INIT, path = GIT_BUF_INIT;
git_hash_ctx ctx;
git_oid hash;