Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2012-12-05 23:47:19 +0400
committerVicent Martí <vicent@github.com>2012-12-05 23:47:19 +0400
commite05ca13f1f3550f59790c0f992841abceee1b4c5 (patch)
treea01c119011d0c6020c9288096d09ed055c475bd8 /tests-clar/status
parenta541eafa606b58e7ce3df8e496da8e032fdb74ec (diff)
parentee1c33b146a366260a4648b1f29f470fedaca0fa (diff)
Merge pull request #1115 from ben/struct-versions
Version info for public structs
Diffstat (limited to 'tests-clar/status')
-rw-r--r--tests-clar/status/ignore.c8
-rw-r--r--tests-clar/status/worktree.c12
2 files changed, 4 insertions, 16 deletions
diff --git a/tests-clar/status/ignore.c b/tests-clar/status/ignore.c
index 27f9d85b9..e2e4aaf18 100644
--- a/tests-clar/status/ignore.c
+++ b/tests-clar/status/ignore.c
@@ -180,9 +180,6 @@ void test_status_ignore__subdirectories(void)
{
status_entry_single st;
int ignored;
- git_status_options opts;
-
- GIT_UNUSED(opts);
g_repo = cl_git_sandbox_init("empty_standard_repo");
@@ -216,11 +213,6 @@ void test_status_ignore__subdirectories(void)
cl_git_mkfile(
"empty_standard_repo/test/ignore_me/file", "I'm going to be ignored!");
- opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR;
- opts.flags = GIT_STATUS_OPT_INCLUDE_IGNORED |
- GIT_STATUS_OPT_INCLUDE_UNTRACKED |
- GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS;
-
memset(&st, 0, sizeof(st));
cl_git_pass(git_status_foreach(g_repo, cb_status__single, &st));
cl_assert_equal_i(2, st.count);
diff --git a/tests-clar/status/worktree.c b/tests-clar/status/worktree.c
index 7ae1883b9..a1f7f8684 100644
--- a/tests-clar/status/worktree.c
+++ b/tests-clar/status/worktree.c
@@ -111,7 +111,7 @@ void test_status_worktree__swap_subdir_and_file(void)
status_entry_counts counts;
git_repository *repo = cl_git_sandbox_init("status");
git_index *index;
- git_status_options opts;
+ git_status_options opts = GIT_STATUS_OPTIONS_INIT;
bool ignore_case;
cl_git_pass(git_repository_index(&index, repo));
@@ -133,7 +133,6 @@ void test_status_worktree__swap_subdir_and_file(void)
counts.expected_paths = ignore_case ? entry_paths3_icase : entry_paths3;
counts.expected_statuses = ignore_case ? entry_statuses3_icase : entry_statuses3;
- memset(&opts, 0, sizeof(opts));
opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED |
GIT_STATUS_OPT_INCLUDE_IGNORED;
@@ -150,7 +149,7 @@ void test_status_worktree__swap_subdir_with_recurse_and_pathspec(void)
{
status_entry_counts counts;
git_repository *repo = cl_git_sandbox_init("status");
- git_status_options opts;
+ git_status_options opts = GIT_STATUS_OPTIONS_INIT;
/* first alter the contents of the worktree */
cl_git_pass(p_rename("status/current_file", "status/swap"));
@@ -167,7 +166,6 @@ void test_status_worktree__swap_subdir_with_recurse_and_pathspec(void)
counts.expected_paths = entry_paths4;
counts.expected_statuses = entry_statuses4;
- memset(&opts, 0, sizeof(opts));
opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED |
GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS;
/* TODO: set pathspec to "current_file" eventually */
@@ -691,7 +689,7 @@ void test_status_worktree__filemode_changes(void)
{
git_repository *repo = cl_git_sandbox_init("filemodes");
status_entry_counts counts;
- git_status_options opts;
+ git_status_options opts = GIT_STATUS_OPTIONS_INIT;
git_config *cfg;
/* overwrite stored filemode with platform appropriate value */
@@ -708,7 +706,6 @@ void test_status_worktree__filemode_changes(void)
filemode_statuses[i] = GIT_STATUS_CURRENT;
}
- memset(&opts, 0, sizeof(opts));
opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED |
GIT_STATUS_OPT_INCLUDE_IGNORED |
GIT_STATUS_OPT_INCLUDE_UNMODIFIED;
@@ -746,7 +743,7 @@ static int cb_status__expected_path(const char *p, unsigned int s, void *payload
void test_status_worktree__disable_pathspec_match(void)
{
git_repository *repo;
- git_status_options opts;
+ git_status_options opts = GIT_STATUS_OPTIONS_INIT;
char *file_with_bracket = "LICENSE[1].md",
*imaginary_file_with_bracket = "LICENSE[1-2].md";
@@ -754,7 +751,6 @@ void test_status_worktree__disable_pathspec_match(void)
cl_git_mkfile("pathspec/LICENSE[1].md", "screaming bracket\n");
cl_git_mkfile("pathspec/LICENSE1.md", "no bracket\n");
- memset(&opts, 0, sizeof(opts));
opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED |
GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH;
opts.pathspec.count = 1;