summaryrefslogtreecommitdiff
path: root/tests/pack
Commit message (Collapse)AuthorAgeFilesLines
* Fix unpack double freelhchavez2017-12-231-5/+56
| | | | | | | | | | | If an element has been cached, but then the call to packfile_unpack_compressed() fails, the very next thing that happens is that its data is freed and then the element is not removed from the cache, which frees the data again. This change sets obj->data to NULL to avoid the double-free. It also stops trying to resolve deltas after two continuous failed rounds of resolution, and adds a test for this.
* libFuzzer: Fix missing trailer crashlhchavez2017-12-081-0/+17
| | | | | | | This change fixes an invalid memory access when the trailer is missing / corrupt. Found using libFuzzer.
* libFuzzer: Fix a git_packfile_stream leaklhchavez2017-12-061-0/+27
| | | | | | | This change ensures that the git_packfile_stream object in git_indexer_append() does not leak when the stream has errors. Found using libFuzzer.
* Merge pull request #4088 from chescock/packfile-name-using-complete-hashEdward Thomson2017-06-112-6/+6
|\ | | | | Ensure packfiles with different contents have different names
| * indexer: name pack files after trailer hashChris Hescock2017-05-192-6/+6
| | | | | | | | | | | | | | | | | | | | | | Upstream git.git has changed the way how packfiles are named. Previously, they were using a hash of the contained object's OIDs, which has then been changed to use the hash of the complete packfile instead. See 1190a1acf (pack-objects: name pack files after trailer hash, 2013-12-05) in the git.git repository for more information on this change. This commit changes our logic to match the behavior of core git.
* | settings: rename `GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`Patrick Steinhardt2017-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | Initially, the setting has been solely used to enable the use of `fsync()` when creating objects. Since then, the use has been extended to also cover references and index files. As the option is not yet part of any release, we can still correct this by renaming the option to something more sensible, indicating not only correlation to objects. This commit renames the option to `GIT_OPT_ENABLE_FSYNC_GITDIR`. We also move the variable from the object to repository source code.
* | Honor `core.fsyncObjectFiles`ethomson/fsyncEdward Thomson2017-03-021-8/+17
| |
* | win32: don't fsync parent directories on WindowsEdward Thomson2017-02-281-1/+10
| | | | | | | | Windows doesn't support it.
* | fsync: call it "synchronous" object writingEdward Thomson2017-02-281-2/+2
| | | | | | | | | | Rename `GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION` -> `GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`.
* | fsync parent directories when fsyncingEdward Thomson2017-02-281-1/+1
| | | | | | | | | | | | When fsync'ing files, fsync the parent directory in the case where we rename a file into place, or create a new file, to ensure that the directory entry is flushed correctly.
* | packbuilder: honor git_object__synchronized_writingEdward Thomson2017-02-281-0/+19
|/ | | | | Honor `git_object__synchronized_writing` when creating a packfile and corresponding index.
* Addressed review feedbacklhchavez2017-01-141-10/+3
|
* Fix the memory leaklhchavez2017-01-031-1/+9
|
* Add a testlhchavez2017-01-011-0/+40
|
* Silence unused return value warningJacques Germishuys2014-09-261-1/+1
|
* Factor 40 and 41 constants from source.Ciro Santilli2014-09-161-2/+2
|
* Introduce cl_assert_equal_oidEdward Thomson2014-07-011-2/+2
|
* Share packs across repository instancescmn/global-mwfCarlos Martín Nieto2014-06-231-0/+42
| | | | | | | | | | | Opening the same repository multiple times will currently open the same file multiple times, as well as map the same region of the file multiple times. This is not necessary, as the packfile data is immutable. Instead of opening and closing packfiles directly, introduce an indirection and allocate packfiles globally. This does mean locking on each packfile open, but we already use this lock for the global mwindow list so it doesn't introduce a new contention point.
* Fix a bug in the pack::packbuilder suitePhilip Kelley2014-05-171-0/+2
|
* Test cancel from indexer progress callbackRussell Belfer2013-12-112-14/+34
| | | | | | | | | | | | | | | This adds tests that try canceling an indexer operation from within the progress callback. After writing the tests, I wanted to run this under valgrind and had a number of errors in that situation because mmap wasn't working. I added a CMake option to force emulation of mmap and consolidated the Amiga-specific code into that new place (so we don't actually need separate Amiga code now, just have to turn on -DNO_MMAP). Additionally, I made the indexer code propagate error codes more reliably than it used to.
* Update files that reference tests-clarBen Straub2013-11-141-1/+1
|
* Rename tests-clar to testsBen Straub2013-11-142-0/+330