diff options
Diffstat (limited to 'tests/libgit2/status/worktree_init.c')
-rw-r--r-- | tests/libgit2/status/worktree_init.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/libgit2/status/worktree_init.c b/tests/libgit2/status/worktree_init.c index 40f1b2a31..db6e71f12 100644 --- a/tests/libgit2/status/worktree_init.c +++ b/tests/libgit2/status/worktree_init.c @@ -7,6 +7,7 @@ #include "posix.h" #include "util.h" #include "path.h" +#include "index.h" static void cleanup_new_repo(void *path) { @@ -65,7 +66,7 @@ void test_status_worktree_init__status_file_without_index_or_workdir(void) cl_git_pass(git_repository_open(&repo, cl_fixture("testrepo.git"))); cl_git_pass(git_repository_set_workdir(repo, "wd", false)); - cl_git_pass(git_index_open(&index, "empty-index")); + cl_git_pass(git_index__open(&index, "empty-index", GIT_OID_SHA1)); cl_assert_equal_i(0, (int)git_index_entrycount(index)); git_repository_set_index(repo, index); @@ -106,7 +107,7 @@ void test_status_worktree_init__status_file_with_clean_index_and_empty_workdir(v cl_git_pass(git_repository_open(&repo, cl_fixture("testrepo.git"))); cl_git_pass(git_repository_set_workdir(repo, "wd", false)); - cl_git_pass(git_index_open(&index, "my-index")); + cl_git_pass(git_index__open(&index, "my-index", GIT_OID_SHA1)); fill_index_wth_head_entries(repo, index); git_repository_set_index(repo, index); @@ -283,7 +284,7 @@ void test_status_worktree_init__disable_pathspec_match(void) { git_repository *repo; git_status_options opts = GIT_STATUS_OPTIONS_INIT; - char *file_with_bracket = "LICENSE[1].md", + char *file_with_bracket = "LICENSE[1].md", *imaginary_file_with_bracket = "LICENSE[1-2].md"; cl_set_cleanup(&cleanup_new_repo, "pathspec"); @@ -291,18 +292,18 @@ void test_status_worktree_init__disable_pathspec_match(void) cl_git_mkfile("pathspec/LICENSE[1].md", "screaming bracket\n"); cl_git_mkfile("pathspec/LICENSE1.md", "no bracket\n"); - opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED | + opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED | GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH; opts.pathspec.count = 1; opts.pathspec.strings = &file_with_bracket; cl_git_pass( - git_status_foreach_ext(repo, &opts, cb_status__expected_path, + git_status_foreach_ext(repo, &opts, cb_status__expected_path, file_with_bracket) ); /* Test passing a pathspec matching files in the workdir. */ - /* Must not match because pathspecs are disabled. */ + /* Must not match because pathspecs are disabled. */ opts.pathspec.strings = &imaginary_file_with_bracket; cl_git_pass( git_status_foreach_ext(repo, &opts, cb_status__expected_path, NULL) |