|
9830ab3d
|
2020-01-29T02:00:04
|
|
blame: add option to ignore whitespace changes
|
|
62d59467
|
2020-03-08T02:13:11
|
|
Fix segfault when calling git_blame_buffer()
This change makes sure that the hunk is not null before trying to
dereference it. This avoids segfaults, especially when blaming against a
modified buffer (i.e. the index).
Fixes: #5443
|
|
7d65d4cb
|
2020-02-07T11:39:24
|
|
tests: blame: fix conversion specifiers in format string
While the blame helper function `hunk_message` accepts a printf-style
format string, we didn't add a compiler attribute to let the compiler
check for correct conversion specifiers. As a result, some users of the
function used wrong specifiers.
Add the GIT_FORMAT_PRINTF attribute to the function and fix resulting
warnings by using the correct specifiers.
|
|
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.
|
|
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.
|
|
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.
|
|
3b2cb2c9
|
2014-09-16T11:49:25
|
|
Factor 40 and 41 constants from source.
|
|
0cee70eb
|
2014-07-01T14:09:01
|
|
Introduce cl_assert_equal_oid
|
|
0f65733b
|
2014-04-02T18:50:47
|
|
Clar: skip tests
|
|
ada157b2
|
2014-04-02T07:45:16
|
|
Add warning when skipping blame test
|
|
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.
|
|
1574d388
|
2014-02-26T16:58:20
|
|
Merge pull request #2137 from jru/blame-first-parent
Blame first-parent history
|
|
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
|
|
0d8265c8
|
2014-02-22T09:25:41
|
|
Staticize file-local variables
|
|
9e3b901a
|
2014-02-24T00:09:29
|
|
Add unit test
|
|
b92b434f
|
2014-01-09T11:18:38
|
|
Add orig & final commit test.
|
|
5588f073
|
2013-12-09T10:25:36
|
|
Clean up warnings
|
|
17820381
|
2013-11-14T14:05:52
|
|
Rename tests-clar to tests
|