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:
authorRussell Belfer <arrbee@arrbee.com>2012-02-01 01:59:32 +0400
committerRussell Belfer <arrbee@arrbee.com>2012-02-01 01:59:32 +0400
commitadc9bdb3b1428b8edf067ab17c26ef15ec1ac8a7 (patch)
tree779de1400c8c3385ab21fde0bac47b96081c50aa /tests-clar/attr
parent5d3cd4e309517a8ab2b553ad0839493ba45bb97d (diff)
Fix attr path is_dir check
When building an attr path object, the code that checks if the file is a directory was evaluating the file as a relative path to the current working directory, instead of using the repo root. This lead to inconsistent behavior.
Diffstat (limited to 'tests-clar/attr')
-rw-r--r--tests-clar/attr/lookup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests-clar/attr/lookup.c b/tests-clar/attr/lookup.c
index 7779e046f..9462bbe7f 100644
--- a/tests-clar/attr/lookup.c
+++ b/tests-clar/attr/lookup.c
@@ -12,7 +12,7 @@ void test_attr_lookup__simple(void)
cl_assert_strequal(cl_fixture("attr/attr0"), file->path);
cl_assert(file->rules.length == 1);
- cl_git_pass(git_attr_path__init(&path, "test"));
+ cl_git_pass(git_attr_path__init(&path, "test", NULL));
cl_assert_strequal("test", path.path);
cl_assert_strequal("test", path.basename);
cl_assert(!path.is_dir);
@@ -42,7 +42,7 @@ static void run_test_cases(git_attr_file *file, test_case *cases)
int error;
for (c = cases; c->path != NULL; c++) {
- cl_git_pass(git_attr_path__init(&path, c->path));
+ cl_git_pass(git_attr_path__init(&path, c->path, NULL));
if (c->force_dir)
path.is_dir = 1;
@@ -138,7 +138,7 @@ void test_attr_lookup__match_variants(void)
cl_assert_strequal(cl_fixture("attr/attr1"), file->path);
cl_assert(file->rules.length == 10);
- cl_git_pass(git_attr_path__init(&path, "/testing/for/pat0"));
+ cl_git_pass(git_attr_path__init(&path, "/testing/for/pat0", NULL));
cl_assert_strequal("pat0", path.basename);
run_test_cases(file, cases);