From 4e498646b6e4f3e6303cd3a27682dcd10d97eaeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Thu, 15 Jan 2015 16:50:31 +0100 Subject: repository: remove log message override for switching the active branch We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message. --- tests/submodule/init.c | 2 +- tests/submodule/update.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/submodule') diff --git a/tests/submodule/init.c b/tests/submodule/init.c index d12aa5731..3db6dae61 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)); + cl_git_pass(git_repository_set_head_detached(g_repo, git_commit_id((git_commit *)head_commit))); 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/update.c b/tests/submodule/update.c index 803ba36de..533e64efc 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)); + cl_git_pass(git_repository_set_head(g_repo, git_reference_name(branch_reference))); /* * 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)); + cl_git_pass(git_repository_set_head(g_repo, git_reference_name(branch_reference))); /* * 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)); + cl_git_pass(git_repository_set_head(g_repo, git_reference_name(branch_reference))); /* * Verify state after checkout of parent repository. The submodule ID in the -- cgit v1.2.1