diff options
| author | Russell Belfer <rb@github.com> | 2014-04-17 11:53:13 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2014-04-17 15:04:41 -0700 |
| commit | 823c0e9cc142529912976f2e6abff3db456cb204 (patch) | |
| tree | c07051b17bfcff2ef3edc24da05a8bb5ed6616e1 /tests/attr/file.c | |
| parent | e6e8530aa6c8773dd523fd6fe07629b9481a8fee (diff) | |
| download | libgit2-823c0e9cc142529912976f2e6abff3db456cb204.tar.gz | |
Fix broken logic for attr cache invalidation
The checks to see if files were out of date in the attibute cache
was wrong because the cache-breaker data wasn't getting stored
correctly. Additionally, when the cache-breaker triggered, the
old file data was being leaked.
Diffstat (limited to 'tests/attr/file.c')
| -rw-r--r-- | tests/attr/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/attr/file.c b/tests/attr/file.c index e35957b51..1f4108c3c 100644 --- a/tests/attr/file.c +++ b/tests/attr/file.c @@ -13,7 +13,7 @@ void test_attr_file__simple_read(void) cl_git_pass(git_attr_file__load_standalone(&file, cl_fixture("attr/attr0"))); - cl_assert_equal_s(cl_fixture("attr/attr0"), file->ce->path); + cl_assert_equal_s(cl_fixture("attr/attr0"), file->entry->path); cl_assert(file->rules.length == 1); rule = get_rule(0); @@ -39,7 +39,7 @@ void test_attr_file__match_variants(void) cl_git_pass(git_attr_file__load_standalone(&file, cl_fixture("attr/attr1"))); - cl_assert_equal_s(cl_fixture("attr/attr1"), file->ce->path); + cl_assert_equal_s(cl_fixture("attr/attr1"), file->entry->path); cl_assert(file->rules.length == 10); /* let's do a thorough check of this rule, then just verify @@ -123,7 +123,7 @@ void test_attr_file__assign_variants(void) cl_git_pass(git_attr_file__load_standalone(&file, cl_fixture("attr/attr2"))); - cl_assert_equal_s(cl_fixture("attr/attr2"), file->ce->path); + cl_assert_equal_s(cl_fixture("attr/attr2"), file->entry->path); cl_assert(file->rules.length == 11); check_one_assign(file, 0, 0, "pat0", "simple", EXPECT_TRUE, NULL); @@ -188,7 +188,7 @@ void test_attr_file__check_attr_examples(void) git_attr_assignment *assign; cl_git_pass(git_attr_file__load_standalone(&file, cl_fixture("attr/attr3"))); - cl_assert_equal_s(cl_fixture("attr/attr3"), file->ce->path); + cl_assert_equal_s(cl_fixture("attr/attr3"), file->entry->path); cl_assert(file->rules.length == 3); rule = get_rule(0); |
