summaryrefslogtreecommitdiff
path: root/tests/index/tests.c
Commit message (Collapse)AuthorAgeFilesLines
* git_futils_mkdir_*: make a relative-to-base mkdirEdward Thomson2015-09-171-1/+1
| | | | | | | | | | | | Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter assumes that we own everything beneath the base, as if it were being called with a base of the repository or working directory, and is tailored towards checkout and ensuring that there is no bogosity beneath the base that must be cleaned up. This is (at best) slow and (at worst) unsafe in the larger context of a filesystem where we do not own things and cannot do things like unlink symlinks that are in our way.
* Merge pull request #3381 from leoyanggit/index_directory_iteratorEdward Thomson2015-09-081-0/+21
|\ | | | | New feature: add the ablility to iterate through a directory in index
| * New API: git_index_find_prefixLeo Yang2015-09-041-0/+21
| | | | | | | | Find the first index entry matching a prefix.
* | index: add tests around case switchingCarlos Martín Nieto2015-08-141-0/+33
|/ | | | | We were missing tests for switching the case-sensitivity of an index in-memory and then looking up entries in it.
* index: user a better assertion when comparing sizesCarlos Martín Nieto2015-06-191-2/+2
| | | | | This will tell us which numbers we were trying to compare, rather than just telling us that they're different.
* Add API to add a memory buffer to an indexDamien PROFETA2015-02-251-0/+122
| | | | | | git_index_add_frombuffer enables now to store a memory buffer in the odb and to store an entry in the index directly if the index is attached to a repository.
* git_indexwriter: lock then write the indexEdward Thomson2015-02-141-0/+21
| | | | | | Introduce `git_indexwriter`, to allow us to lock the index while performing additional operations, then complete the write (or abort, unlocking the index).
* index tests: test capitalization before mkdirhf/master_patchEdward Thomson2014-12-181-2/+4
|
* Plug leaksCarlos Martín Nieto2014-12-181-0/+2
|
* Create miscapitialised dirs for case-sensitive filesystemsCarlos Martín Nieto2014-12-181-0/+4
| | | | | We need these directories to exist so cl_git_mkfile() can create the files we ask it to.
* treebuilder: take a repository for path validationEdward Thomson2014-12-171-0/+21
| | | | | | Path validation may be influenced by `core.protectHFS` and `core.protectNTFS` configuration settings, thus treebuilders can take a repository to influence their configuration.
* index: Check for valid paths before creating an index entryVicent Marti2014-12-161-8/+93
|
* Spelling fixesWill Stamper2014-12-041-1/+1
|
* Introduce cl_assert_equal_oidEdward Thomson2014-07-011-4/+4
|
* Some vector utility tweaksRussell Belfer2014-04-171-17/+3
| | | | | This is just laying some groundwork for internal index changes that I'm working on.
* Fix typo setting sorted flag when reloading indexRussell Belfer2014-02-041-0/+34
| | | | | | | This fixes a typo I made for setting the sorted flag on the index after a reload. That typo didn't actually cause any test failures so I'm also adding a test that explicitly checks that the index is correctly sorted after a reload when ignoring case and when not.
* Convert pqueue to just be a git_vectorRussell Belfer2014-02-041-4/+4
| | | | | | | | | | | | | This updates the git_pqueue to simply be a set of specialized init/insert/pop functions on a git_vector. To preserve the pqueue feature of having a fixed size heap, I converted the "sorted" field in git_vectors to a more general "flags" field so that pqueue could mix in it's own flag. This had a bunch of ramifications because a number of places were directly looking at the vector "sorted" field - I added a couple new git_vector helpers (is_sorted, set_sorted) so the specific representation of this information could be abstracted.
* index: rename an entry's id to 'id'Carlos Martín Nieto2014-01-251-4/+4
| | | | This was not converted when we converted the rest, so do it now.
* tests: Drop unrelated commentnulltoken2013-11-191-1/+0
|
* tree-cache: Don't segfault upon corruptionnulltoken2013-11-191-0/+9
|
* Rename tests-clar to testsBen Straub2013-11-141-0/+537