summaryrefslogtreecommitdiff
path: root/tests/submodule
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-01-07 12:23:05 +0000
committerCarlos Martín Nieto <cmn@dwim.me>2015-03-03 14:40:50 +0100
commit659cf2029f322ea876d663d85783b48945227e8f (patch)
tree435e9185c38d96656e21db83fc736b5294499b10 /tests/submodule
parent99b68a2aecfaa24f252f265d61b230b8e2576dd2 (diff)
downloadlibgit2-659cf2029f322ea876d663d85783b48945227e8f.tar.gz
Remove the signature from ref-modifying functions
The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
Diffstat (limited to 'tests/submodule')
-rw-r--r--tests/submodule/init.c2
-rw-r--r--tests/submodule/lookup.c7
-rw-r--r--tests/submodule/update.c6
3 files changed, 6 insertions, 9 deletions
diff --git a/tests/submodule/init.c b/tests/submodule/init.c
index 29004d6cd..d12aa5731 100644
--- a/tests/submodule/init.c
+++ b/tests/submodule/init.c
@@ -89,7 +89,7 @@ void test_submodule_init__relative_url_detached_head(void)
cl_git_pass(git_repository_head(&head_ref, g_repo));
cl_git_pass(git_reference_peel(&head_commit, head_ref, GIT_OBJ_COMMIT));
- cl_git_pass(git_repository_set_head_detached(g_repo, git_commit_id((git_commit *)head_commit), NULL, NULL));
+ cl_git_pass(git_repository_set_head_detached(g_repo, git_commit_id((git_commit *)head_commit), NULL));
cl_assert(git_path_dirname_r(&absolute_url, git_repository_workdir(g_repo)) > 0);
cl_git_pass(git_buf_joinpath(&absolute_url, absolute_url.ptr, "testrepo.git"));
diff --git a/tests/submodule/lookup.c b/tests/submodule/lookup.c
index fa452fb82..666f56ef1 100644
--- a/tests/submodule/lookup.c
+++ b/tests/submodule/lookup.c
@@ -112,7 +112,7 @@ void test_submodule_lookup__lookup_even_with_unborn_head(void)
/* put us on an unborn branch */
cl_git_pass(git_reference_symbolic_create(
- &head, g_repo, "HEAD", "refs/heads/garbage", 1, NULL, NULL));
+ &head, g_repo, "HEAD", "refs/heads/garbage", 1, NULL));
git_reference_free(head);
test_submodule_lookup__simple_lookup(); /* baseline should still pass */
@@ -259,10 +259,7 @@ void test_submodule_lookup__just_added(void)
assert_submodule_exists(g_repo, "sm_just_added_head");
{
- git_signature *sig;
- cl_git_pass(git_signature_now(&sig, "resetter", "resetter@email.com"));
- cl_git_pass(git_reference_create(NULL, g_repo, "refs/heads/master", git_reference_target(original_head), 1, sig, "move head back"));
- git_signature_free(sig);
+ cl_git_pass(git_reference_create(NULL, g_repo, "refs/heads/master", git_reference_target(original_head), 1, "move head back"));
git_reference_free(original_head);
}
diff --git a/tests/submodule/update.c b/tests/submodule/update.c
index ebf864d9f..803ba36de 100644
--- a/tests/submodule/update.c
+++ b/tests/submodule/update.c
@@ -196,7 +196,7 @@ void test_submodule_update__update_already_checked_out_submodule(void)
cl_git_pass(git_reference_lookup(&branch_reference, g_repo, "refs/heads/alternate_1"));
cl_git_pass(git_reference_peel(&branch_commit, branch_reference, GIT_OBJ_COMMIT));
cl_git_pass(git_checkout_tree(g_repo, branch_commit, &checkout_options));
- cl_git_pass(git_repository_set_head(g_repo, git_reference_name(branch_reference), NULL, NULL));
+ cl_git_pass(git_repository_set_head(g_repo, git_reference_name(branch_reference), NULL));
/*
* Verify state after checkout of parent repository. The submodule ID in the
@@ -270,7 +270,7 @@ void test_submodule_update__update_blocks_on_dirty_wd(void)
cl_git_pass(git_reference_lookup(&branch_reference, g_repo, "refs/heads/alternate_1"));
cl_git_pass(git_reference_peel(&branch_commit, branch_reference, GIT_OBJ_COMMIT));
cl_git_pass(git_checkout_tree(g_repo, branch_commit, &checkout_options));
- cl_git_pass(git_repository_set_head(g_repo, git_reference_name(branch_reference), NULL, NULL));
+ cl_git_pass(git_repository_set_head(g_repo, git_reference_name(branch_reference), NULL));
/*
* Verify state after checkout of parent repository. The submodule ID in the
@@ -343,7 +343,7 @@ void test_submodule_update__can_force_update(void)
cl_git_pass(git_reference_lookup(&branch_reference, g_repo, "refs/heads/alternate_1"));
cl_git_pass(git_reference_peel(&branch_commit, branch_reference, GIT_OBJ_COMMIT));
cl_git_pass(git_checkout_tree(g_repo, branch_commit, &checkout_options));
- cl_git_pass(git_repository_set_head(g_repo, git_reference_name(branch_reference), NULL, NULL));
+ cl_git_pass(git_repository_set_head(g_repo, git_reference_name(branch_reference), NULL));
/*
* Verify state after checkout of parent repository. The submodule ID in the