|
f673e232
|
2018-12-27T13:47:34
|
|
git_error: use new names in internal APIs and usage
Move to the `git_error` name in the internal API for error-related
functions.
|
|
2afd0185
|
2018-08-19T12:57:29
|
|
threads::iterator: use separate repository objects
Our thread policies state that we cannot re-use the `git_repository`
across threads. Our tests cannot deviate from that.
Courtesy of Ximin Luo, https://github.com/infinity0:
https://github.com/libgit2/libgit2/issues/4753#issuecomment-412247757
|
|
d1919485
|
2018-08-05T11:01:14
|
|
threads::diff: use separate git_repository objects
Our thread policies state that we cannot re-use the `git_repository`
across threads. Our tests cannot deviate from that.
|
|
9994cd3f
|
2018-06-25T11:56:52
|
|
treewide: remove use of C++ style comments
C++ style comment ("//") are not specified by the ISO C90 standard and
thus do not conform to it. While libgit2 aims to conform to C90, we did
not enforce it until now, which is why quite a lot of these
non-conforming comments have snuck into our codebase. Do a tree-wide
conversion of all C++ style comments to the supported C style comments
to allow us enforcing strict C90 compliance in a later commit.
|
|
98a5f081
|
2017-05-03T13:53:13
|
|
tests: threads::basic: remove unused function `exit_abruptly`
|
|
13c275ab
|
2017-04-21T07:49:08
|
|
tests: threads::diff: fix warning for unused variable
The threads::diff test suite has a static variable `_retries`, which is
used on Windows platforms only. As it is unused on other systems, the
compiler throws a warning there. Fix the warning by wrapping the
declaration in an ifdef.
|
|
48f09c6c
|
2017-04-05T11:59:03
|
|
win32: only set `git_win32__retries` where it exists
|
|
7ece9065
|
2017-04-03T23:07:16
|
|
win32: make posix emulation retries configurable
POSIX emulation retries should be configurable so that tests can disable
them. In particular, maniacally threading tests may end up trying to
open locked files and need retries, which will slow continuous
integration tests significantly.
|
|
b31283a6
|
2016-12-12T17:09:12
|
|
refdb: disable concurrent compress in the threading tests on Windows
This is far from an ideal situation, but this causes issues on Windows which
make it harder to develop anything, as these tests hit issues which relate
specifically to the Windows filesystem like permission errors for files we
should be able to access. There is an issue likely related to the ordering of
the repack, but there's enough noise that it does not currently help us to run
this aspect of the test in CI.
|
|
6367c58c
|
2016-11-18T18:30:20
|
|
tests: handle life without threads
|
|
6a05c7a0
|
2016-11-18T07:37:47
|
|
threads::refdb tests: use new threaded clar assert
|
|
82f15896
|
2016-11-18T07:19:22
|
|
threads: introduce `git_thread_exit`
Introduce `git_thread_exit`, which will allow threads to terminate at an
arbitrary time, returning a `void *`. On Windows, this means that we
need to store the current `git_thread` in TLS, so that we can set its
`return` value when terminating.
We cannot simply use `ExitThread`, since Win32 returns `DWORD`s from
threads; we return `void *`.
|
|
aef54a46
|
2016-11-14T11:29:40
|
|
refdb: use a constant for the number of per-thread creations/deletes
|
|
ce5553d4
|
2016-03-10T22:01:09
|
|
refdb: bubble up locked files on the read side
On Windows we can find locked files even when reading a reference or the
packed-refs file. Bubble up the error in this case as well to allow
callers on Windows to retry more intelligently.
|
|
7c32d874
|
2016-03-10T12:27:07
|
|
refdb: expect threaded test deletes to race
At times we may try to delete a reference which a different thread has
already taken care of.
|
|
26416f6d
|
2015-12-24T17:51:19
|
|
refdb: add retry logic to the threaded tests
The logic simply consists of retrying for as long as the library says
the data is locked, but it eventually gets through.
|
|
7da4c429
|
2015-12-24T12:37:41
|
|
refdb: adjust the threading tests to what we promise
We say it's going to work if you use a different repository in each
thread. Let's do precisely that in our code instead of hoping re-using
the refdb is going to work.
This test does fail currently, surfacing existing bugs.
|
|
faebc1c6
|
2016-06-20T17:44:04
|
|
threads: split up OS-dependent thread code
|
|
ed1c6446
|
2015-07-28T11:41:27
|
|
iterator: use an options struct instead of args
|
|
659cf202
|
2015-01-07T12:23:05
|
|
Remove the signature from ref-modifying functions
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.
In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
|
|
799e22ea
|
2014-10-23T17:34:41
|
|
Rename git_threads_ to git_libgit2_
This describes their purpose better, as we now initialize ssl and some
other global stuff in there. Calling the init function is not something
which has been optional for a while now.
|
|
62a617dc
|
2014-11-06T16:16:46
|
|
iterator: submodules are determined by an index or tree
We cannot know from looking at .gitmodules whether a directory is a
submodule or not. We need the index or tree we are comparing against to
tell us. Otherwise we have to assume the entry in .gitmodules is stale
or otherwise invalid.
Thus we pass the index of the repository into the workdir iterator, even
if we do not want to compare against it. This follows what git does,
which even for `git diff <tree>`, it will consider staged submodules as
such.
|
|
fdea219a
|
2014-09-10T18:28:19
|
|
global: free the error message when exiting a thread
When we free the global state at thread termination, we must also free
the error message in order not to leak the string once per thread.
|
|
c7dd0a56
|
2014-07-12T14:44:58
|
|
Use p_snprintf also in tests
|
|
905fb592
|
2014-07-03T05:47:34
|
|
Move yield to the tests and enable for FreeBSD
Move the definition of git_thread_yield() to the test which needs it and
add the correct definition for it for FreeBSD and derivatives.
Original patch adding FreeBSD and derivatives by @jacquesg.
|
|
fb591767
|
2014-06-07T12:51:48
|
|
Win32: Fix object::cache::threadmania test on x64
|
|
bb45e390
|
2014-05-08T15:01:07
|
|
Disable threads::refdb::edit_while_iterate test
It seems that with the various recent changes to reference updating
and reflog writing, that the thread safety of refdb updates has
been reduced (either that or it was never thread safe and the
window for error has increased). Either way, this test is now
sometimes segfaulting which is no good, so let's disable the test
for now. We don't really make any public promises about thread
safety for this type of operation, so I think this is acceptable,
at least in the short term.
|
|
83038272
|
2014-04-17T14:35:29
|
|
Some memory leak fixes
|
|
ea642d61
|
2014-04-14T12:29:27
|
|
Fix race checking for existing index items
In the threading tests, I was still seeing a race condition where
the same item could end up being inserted multiple times into the
index. Preserving the sorted-ness of the index outside of the
`index_insert` call fixes the issue.
|
|
7d490872
|
2014-04-10T22:31:01
|
|
Attribute file cache refactor
This is a big refactoring of the attribute file cache to be a bit
simpler which in turn makes it easier to enforce a lock around any
updates to the cache so that it can be used in a threaded env.
Tons of changes to the attributes and ignores code.
|
|
3816debc
|
2014-03-14T14:51:04
|
|
Fix threading tests when threads disabled
|
|
8a2834d3
|
2014-03-14T13:20:51
|
|
Index locking and entry allocation changes
This makes the lock management on the index a little bit broader,
having a number of routines hold the lock across looking up the
item to be modified and actually making the modification. Still
not true thread safety, but more pure index modifications are now
safe which allows the simple cases (such as starting up a diff
while index modifications are underway) safe enough to get the
snapshot without hitting allocation problems.
As part of this, I simplified the allocation of index entries to
use a flex array and just put the path at the end of the index
entry. This makes every entry self-contained and makes it a
little easier to feel sure that pointers to strings aren't
being accidentally copied and freed while other references are
still being held.
|
|
40ed4990
|
2014-02-11T14:45:37
|
|
Add diff threading tests and attr file cache locks
This adds a basic test of doing simultaneous diffs on multiple
threads and adds basic locking for the attr file cache because
that was the immediate problem that arose from these tests.
|
|
0b28217b
|
2014-01-15T12:51:31
|
|
refs: remove the _with_log differentiation
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
|
|
17820381
|
2013-11-14T14:05:52
|
|
Rename tests-clar to tests
|