summaryrefslogtreecommitdiff
path: root/tests/repo/iterator.c
Commit message (Collapse)AuthorAgeFilesLines
* Horrible fix for #3173.Arthur Schreiber2016-02-111-25/+25
|
* git_futils_mkdir_*: make a relative-to-base mkdirEdward Thomson2015-09-171-3/+3
| | | | | | | | | | | | 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.
* iterator test: handle case (in)sensitivityEdward Thomson2015-08-311-3/+26
|
* iterator test: use new iter opts in fifo testEdward Thomson2015-08-311-2/+5
|
* iterator: saner pathlist matching for idx iteratorEdward Thomson2015-08-311-0/+70
| | | | | | | | | | | | Some nicer refactoring for index iteration walks. The index iterator doesn't binary search through the pathlist space, since it lacks directory entries, and would have to binary search each index entry and all its parents (eg, when presented with an index entry of `foo/bar/file.c`, you would have to look in the pathlist for `foo/bar/file.c`, `foo/bar` and `foo`). Since the index entries and the pathlist are both nicely sorted, we walk the index entries in lockstep with the pathlist like we do for other iteration/diff/merge walks.
* tree_iterator: use a pathlistEdward Thomson2015-08-301-0/+114
|
* diff: use new iterator pathlist handlingEdward Thomson2015-08-301-6/+11
| | | | | | | | When using literal pathspecs in diff with `GIT_DIFF_DISABLE_PATHSPEC_MATCH` turn on the faster iterator pathlist handling. Updates iterator pathspecs to include directory prefixes (eg, `foo/`) for compatibility with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`.
* iterator: sort subdirs properly with pathlistEdward Thomson2015-08-281-1/+7
| | | | | | | | | | When given a pathlist, don't assume that directories sort before files. Walk through any list of entries sorting before us to make sure that we've exhausted all entries that *aren't* directories. Eg, if we're searching for 'foo/bar', and we have a 'foo.c', keep advancing the pathlist to keep looking for an entry prefixed with 'foo/'.
* Move filelist into the iterator handling itself.Edward Thomson2015-08-281-0/+248
|
* iterator: use an options struct instead of argsEdward Thomson2015-08-281-135/+219
|
* iterator: adjust unreadable-dir test to new behaviourcmn/iterator-skip-diriterCarlos Martín Nieto2015-07-271-5/+1
| | | | | We don't want the iterator to make us stop whenever we hit an unreadable dir. We should instead move over to the next item.
* tests: update for new test dataEdward Thomson2015-02-021-1/+2
|
* treebuilder: rename _create() to _new()cmn/treebuilder-newCarlos Martín Nieto2014-12-271-1/+1
| | | | | | This function is a constructor, so let's name it like one and leave _create() for the reference functions, which do create/write the reference.
* treebuilder: take a repository for path validationEdward Thomson2014-12-171-2/+2
| | | | | | Path validation may be influenced by `core.protectHFS` and `core.protectNTFS` configuration settings, thus treebuilders can take a repository to influence their configuration.
* iterator: submodules are determined by an index or treecmn/submodule-and-dirCarlos Martín Nieto2014-11-071-17/+17
| | | | | | | | | | | | 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.
* Don't report status on named pipesRussell Belfer2014-08-081-0/+32
| | | | | Git skips entries in directories that are not S_ISDIR, S_ISREG, or S_ISLNK, so let's make libgit2 do the same thing.
* Address PR commentsRussell Belfer2014-02-201-1/+1
| | | | | | | * Make GIT_INLINE an internal definition so it cannot be used in public headers * Fix language in CONTRIBUTING * Make index caps API use signed instead of unsigned values
* Rename tests-clar to testsBen Straub2013-11-141-0/+962