From 8061d519b33c95a8858752e7d70d40fe8bae90f9 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Tue, 1 Apr 2014 13:24:06 -0700 Subject: Remove most submodule reloads from tests With the new submodule cache validity checks, we generally don't need to call git_submodule_reload_all to have up-to-date submodule data. Some tests are still calling it where I want to actually test that it can be called safely and doesn't break anything, but mostly it is not needed. This also expands some of the existing submodule tests to cover some variants on the behavior that was already being tested. --- tests/diff/submodules.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tests/diff/submodules.c') diff --git a/tests/diff/submodules.c b/tests/diff/submodules.c index 2881f74be..02870ac86 100644 --- a/tests/diff/submodules.c +++ b/tests/diff/submodules.c @@ -131,8 +131,6 @@ void test_diff_submodules__dirty_submodule_2(void) g_repo = setup_fixture_submodules(); - cl_git_pass(git_submodule_reload_all(g_repo, 1)); - opts.flags = GIT_DIFF_INCLUDE_UNTRACKED | GIT_DIFF_SHOW_UNTRACKED_CONTENT | GIT_DIFF_RECURSE_UNTRACKED_DIRS | @@ -165,8 +163,6 @@ void test_diff_submodules__dirty_submodule_2(void) git_diff_free(diff); - cl_git_pass(git_submodule_reload_all(g_repo, 1)); - cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); check_diff_patches(diff, expected_dirty); git_diff_free(diff); @@ -299,7 +295,6 @@ void test_diff_submodules__invalid_cache(void) git_submodule_free(sm); - cl_git_pass(git_submodule_reload_all(g_repo, 1)); cl_git_pass(git_submodule_lookup(&sm, g_repo, smpath)); cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); -- cgit v1.2.1