tests/blame


Log

Author Commit Date CI Message
Patrick Steinhardt add17435 2019-05-24T15:24:26 cache: fix cache eviction using deallocated key When evicting cache entries, we first retrieve the object that is to be evicted, delete the object and then finally delete the key from the cache. In case where the cache eviction caused us to free the cached object, though, its key will point to invalid memory now when trying to remove it from the cache map. On my system, this causes us to not properly remove the key from the map, as its memory has been overwritten already and thus the key lookup it will fail and we cannot delete it. Fix this by only decrementing the refcount of the evictee after we have removed it from our cache map. Add a test that caused a segfault previous to that change.
Patrick Steinhardt cb1cb24c 2015-11-24T10:18:58 blame: use size_t for line counts in git_blame_hunk It is not unreasonable to have versioned files with a line count exceeding 2^16. Upon blaming such files we fail to correctly keep track of the lines as `git_blame_hunk` stores them in `uint16_t` fields. Fix this by converting the line fields of `git_blame_hunk` to `size_t`. Add test to verify behavior.
Matthew Plough 768f8be3 2015-06-30T19:00:41 Fix #3094 - improve use of portable size_t/ssize_t format specifiers. The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
Ciro Santilli 3b2cb2c9 2014-09-16T11:49:25 Factor 40 and 41 constants from source.
Edward Thomson 0cee70eb 2014-07-01T14:09:01 Introduce cl_assert_equal_oid
Vicent Marti 0f65733b 2014-04-02T18:50:47 Clar: skip tests
Russell Belfer ada157b2 2014-04-02T07:45:16 Add warning when skipping blame test
Russell Belfer d1a09004 2014-04-01T21:58:48 Skip blame libgit2 test if not in libgit2 repo One blame test replies on being run from within the libgit2 repository to leverage having a longer history to play with, but some bundled versions of libgit2 don't have the whole libgit2 history. This just skips that test if the repository can't be opened.
Ben Straub 1574d388 2014-02-26T16:58:20 Merge pull request #2137 from jru/blame-first-parent Blame first-parent history
Juan Rubén 0276f0f5 2014-02-26T19:22:19 Reset num_parents to 1 only for merge commits Also, correct test case to account for the boundary flag
Ben Straub 0d8265c8 2014-02-22T09:25:41 Staticize file-local variables
Juan Rubén 9e3b901a 2014-02-24T00:09:29 Add unit test
XTao b92b434f 2014-01-09T11:18:38 Add orig & final commit test.
Edward Thomson 5588f073 2013-12-09T10:25:36 Clean up warnings
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests