summaryrefslogtreecommitdiff
path: root/tests/diff/diffiter.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-07-29 12:59:42 -0400
committerEdward Thomson <ethomson@github.com>2016-08-04 12:26:06 -0400
commit031d34b7e8dbfaeb05898e17ba71d0b156c898ec (patch)
tree140f2723c533699665f73956760bbbda0994aadf /tests/diff/diffiter.c
parent152efee20b74ea261cf8e05410a110687e17376e (diff)
downloadlibgit2-031d34b7e8dbfaeb05898e17ba71d0b156c898ec.tar.gz
sysdir: use the standard `init` patternethomson/paths_init
Don't try to determine when sysdirs are uninitialized. Instead, simply initialize them all at `git_libgit2_init` time and never try to reinitialize, except when consumers explicitly call `git_sysdir_set`. Looking at the buffer length is especially problematic, since there may no appropriate path for that value. (For example, the Windows-specific programdata directory has no value on non-Windows machines.) Previously we would continually trying to re-lookup these values, which could get racy if two different threads are each calling `git_sysdir_get` and trying to lookup / clear the value simultaneously.
Diffstat (limited to 'tests/diff/diffiter.c')
0 files changed, 0 insertions, 0 deletions