diff options
| author | Vicent Marti <vicent@github.com> | 2014-03-26 10:29:11 +0100 |
|---|---|---|
| committer | Vicent Marti <vicent@github.com> | 2014-03-26 10:29:11 +0100 |
| commit | 77b699e0da3d4a4fed742893bd172f3ee7b936d5 (patch) | |
| tree | d99dc48da9b9105f955af24a0d7a763e9a7b5dea /tests/submodule | |
| parent | fcbbe1bd82c5e50bcd4a8d31bb68df7fe662026b (diff) | |
| parent | d3bc95fd664095a0c8dfcdf99f62741b1ecd6ffc (diff) | |
| download | libgit2-77b699e0da3d4a4fed742893bd172f3ee7b936d5.tar.gz | |
Merge pull request #2205 from libgit2/rb/submodule-untracked-vs-ignored
Update behavior for untracked contained repositories
Diffstat (limited to 'tests/submodule')
| -rw-r--r-- | tests/submodule/status.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/submodule/status.c b/tests/submodule/status.c index f5111c84f..324592301 100644 --- a/tests/submodule/status.c +++ b/tests/submodule/status.c @@ -324,7 +324,7 @@ static int confirm_submodule_status( { submodule_expectations *exp = payload; - while (git__suffixcmp(exp->paths[exp->counter], "/") == 0) + while (exp->statuses[exp->counter] < 0) exp->counter++; cl_assert_equal_i(exp->statuses[exp->counter], (int)status_flags); @@ -345,8 +345,10 @@ void test_submodule_status__iterator(void) "just_a_dir/", "just_a_dir/contents", "just_a_file", - "not", - "not-submodule", + "not-submodule/", + "not-submodule/README.txt", + "not/", + "not/README.txt", "README.txt", "sm_added_and_uncommited", "sm_changed_file", @@ -359,11 +361,13 @@ void test_submodule_status__iterator(void) }; static int expected_flags[] = { GIT_STATUS_INDEX_MODIFIED | GIT_STATUS_WT_MODIFIED, /* ".gitmodules" */ - 0, /* "just_a_dir/" will be skipped */ + -1, /* "just_a_dir/" will be skipped */ GIT_STATUS_CURRENT, /* "just_a_dir/contents" */ GIT_STATUS_CURRENT, /* "just_a_file" */ - GIT_STATUS_IGNORED, /* "not" (contains .git) */ - GIT_STATUS_IGNORED, /* "not-submodule" (contains .git) */ + GIT_STATUS_WT_NEW, /* "not-submodule/" untracked item */ + -1, /* "not-submodule/README.txt" */ + GIT_STATUS_WT_NEW, /* "not/" untracked item */ + -1, /* "not/README.txt" */ GIT_STATUS_CURRENT, /* "README.txt */ GIT_STATUS_INDEX_NEW, /* "sm_added_and_uncommited" */ GIT_STATUS_WT_MODIFIED, /* "sm_changed_file" */ |
