diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-04 17:29:12 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-22 17:02:55 +0200 |
| commit | c6f489c964bc4df29bdacb1ee4afdcdb294f3815 (patch) | |
| tree | 2311b70fa744c2552208d4d05ff76176d0827a17 /tests/submodule/update.c | |
| parent | 64bbd47a32e6aaed539bafd109eef624f24fbae7 (diff) | |
| download | libgit2-c6f489c964bc4df29bdacb1ee4afdcdb294f3815.tar.gz | |
submodule: add an ignore option to status
This lets us specify in the status call which ignore rules we want to
use (optionally falling back to whatever the submodule has in its
configuration).
This removes one of the reasons for having `_set_ignore()` set the value
in-memory. We re-use the `IGNORE_RESET` value for this as it is no
longer relevant but has a similar purpose to `IGNORE_FALLBACK`.
Similarly, we remove `IGNORE_DEFAULT` which does not have use outside of
initializers and move that to fall back to the configuration as well.
Diffstat (limited to 'tests/submodule/update.c')
| -rw-r--r-- | tests/submodule/update.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/submodule/update.c b/tests/submodule/update.c index 85870434e..fed6d38b3 100644 --- a/tests/submodule/update.c +++ b/tests/submodule/update.c @@ -103,7 +103,7 @@ void test_submodule_update__update_submodule(void) cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); /* verify the initial state of the submodule */ - cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo")); + cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK)); cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD | GIT_SUBMODULE_STATUS_IN_INDEX | GIT_SUBMODULE_STATUS_IN_CONFIG | @@ -114,7 +114,7 @@ void test_submodule_update__update_submodule(void) cl_git_pass(git_submodule_update(sm, 0, &update_options)); /* verify state */ - cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo")); + cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK)); cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD | GIT_SUBMODULE_STATUS_IN_INDEX | GIT_SUBMODULE_STATUS_IN_CONFIG | @@ -142,7 +142,7 @@ void test_submodule_update__update_and_init_submodule(void) /* get the submodule */ cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); - cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo")); + cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK)); cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD | GIT_SUBMODULE_STATUS_IN_INDEX | GIT_SUBMODULE_STATUS_IN_CONFIG | @@ -177,7 +177,7 @@ void test_submodule_update__update_already_checked_out_submodule(void) /* Initialize and update the sub repository */ cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); - cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo")); + cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK)); cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD | GIT_SUBMODULE_STATUS_IN_INDEX | GIT_SUBMODULE_STATUS_IN_CONFIG | @@ -203,7 +203,7 @@ void test_submodule_update__update_already_checked_out_submodule(void) * HEAD commit and index should be updated, but not the workdir. */ - cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo")); + cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK)); git_submodule_free(sm); cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); @@ -255,7 +255,7 @@ void test_submodule_update__update_blocks_on_dirty_wd(void) /* Initialize and update the sub repository */ cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); - cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo")); + cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK)); cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD | GIT_SUBMODULE_STATUS_IN_INDEX | GIT_SUBMODULE_STATUS_IN_CONFIG | @@ -281,7 +281,7 @@ void test_submodule_update__update_blocks_on_dirty_wd(void) * HEAD commit and index should be updated, but not the workdir. */ - cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo")); + cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK)); git_submodule_free(sm); cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); @@ -332,7 +332,7 @@ void test_submodule_update__can_force_update(void) /* Initialize and update the sub repository */ cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); - cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo")); + cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK)); cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_HEAD | GIT_SUBMODULE_STATUS_IN_INDEX | GIT_SUBMODULE_STATUS_IN_CONFIG | @@ -357,7 +357,7 @@ void test_submodule_update__can_force_update(void) * Verify state after checkout of parent repository. The submodule ID in the * HEAD commit and index should be updated, but not the workdir. */ - cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo")); + cl_git_pass(git_submodule_status(&submodule_status, g_repo, "testrepo", GIT_SUBMODULE_IGNORE_FALLBACK)); git_submodule_free(sm); cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo")); |
