diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-04 16:22:56 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-22 17:02:55 +0200 |
commit | 5a9fc6c83c2fd12ce312d1042ec2c1e6abad4033 (patch) | |
tree | 80f41e0481654c349adb9762d377d2599869bcb6 /tests/diff | |
parent | dfda2f68ea9602a6b0d08e36bd48e6a4899b12ff (diff) | |
download | libgit2-5a9fc6c83c2fd12ce312d1042ec2c1e6abad4033.tar.gz |
submodule: make set_ignore() affect the configuration
Instead of affecting a particular instance, make it change the
configuration.
Diffstat (limited to 'tests/diff')
-rw-r--r-- | tests/diff/submodules.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/diff/submodules.c b/tests/diff/submodules.c index e2169583b..08682cd4b 100644 --- a/tests/diff/submodules.c +++ b/tests/diff/submodules.c @@ -273,13 +273,13 @@ void test_diff_submodules__invalid_cache(void) /* create untracked file in submodule working directory */ cl_git_mkfile("submod2/sm_changed_head/new_around_here", "hello"); - git_submodule_set_ignore(sm, GIT_SUBMODULE_IGNORE_NONE); + git_submodule_set_ignore(g_repo, git_submodule_name(sm), GIT_SUBMODULE_IGNORE_NONE); cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); check_diff_patches(diff, expected_dirty); git_diff_free(diff); - git_submodule_set_ignore(sm, GIT_SUBMODULE_IGNORE_UNTRACKED); + git_submodule_set_ignore(g_repo, git_submodule_name(sm), GIT_SUBMODULE_IGNORE_UNTRACKED); cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); check_diff_patches(diff, expected_unchanged); @@ -301,7 +301,7 @@ void test_diff_submodules__invalid_cache(void) check_diff_patches(diff, expected_dirty); git_diff_free(diff); - git_submodule_set_ignore(sm, GIT_SUBMODULE_IGNORE_DIRTY); + git_submodule_set_ignore(g_repo, git_submodule_name(sm), GIT_SUBMODULE_IGNORE_DIRTY); cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); check_diff_patches(diff, expected_unchanged); @@ -312,13 +312,13 @@ void test_diff_submodules__invalid_cache(void) cl_git_pass(git_repository_index(&smindex, smrepo)); cl_git_pass(git_index_add_bypath(smindex, "file_to_modify")); - git_submodule_set_ignore(sm, GIT_SUBMODULE_IGNORE_UNTRACKED); + git_submodule_set_ignore(g_repo, git_submodule_name(sm), GIT_SUBMODULE_IGNORE_UNTRACKED); cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); check_diff_patches(diff, expected_dirty); git_diff_free(diff); - git_submodule_set_ignore(sm, GIT_SUBMODULE_IGNORE_DIRTY); + git_submodule_set_ignore(g_repo, git_submodule_name(sm), GIT_SUBMODULE_IGNORE_DIRTY); cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); check_diff_patches(diff, expected_unchanged); @@ -327,19 +327,19 @@ void test_diff_submodules__invalid_cache(void) /* commit changed index of submodule */ cl_repo_commit_from_index(NULL, smrepo, NULL, 1372350000, "Move it"); - git_submodule_set_ignore(sm, GIT_SUBMODULE_IGNORE_DIRTY); + git_submodule_set_ignore(g_repo, git_submodule_name(sm), GIT_SUBMODULE_IGNORE_DIRTY); cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); check_diff_patches(diff, expected_moved); git_diff_free(diff); - git_submodule_set_ignore(sm, GIT_SUBMODULE_IGNORE_ALL); + git_submodule_set_ignore(g_repo, git_submodule_name(sm), GIT_SUBMODULE_IGNORE_ALL); cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); check_diff_patches(diff, expected_unchanged); git_diff_free(diff); - git_submodule_set_ignore(sm, GIT_SUBMODULE_IGNORE_NONE); + git_submodule_set_ignore(g_repo, git_submodule_name(sm), GIT_SUBMODULE_IGNORE_NONE); cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts)); check_diff_patches(diff, expected_moved_dirty); |