summaryrefslogtreecommitdiff
path: root/tests/attr
Commit message (Collapse)AuthorAgeFilesLines
* Make ** pattern eat trailing slashrb/fix-starstar-againRussell Belfer2014-05-011-0/+18
| | | | This allows "foo/**/*.html" to match "foo/file.html"
* Preload attribute files that may contain macrosRussell Belfer2014-04-181-39/+64
| | | | | | | | | There was a latent bug where files that use macro definitions could be parsed before the macro definitions were loaded. Because of attribute file caching, preloading files that are going to be used doesn't add a significant amount of overhead, so let's always preload any files that could contain macros before we assemble the actual vector of files to scan for attributes.
* Cleanup tests with helper functionsRussell Belfer2014-04-181-1/+1
|
* Fix broken logic for attr cache invalidationRussell Belfer2014-04-173-10/+13
| | | | | | | The checks to see if files were out of date in the attibute cache was wrong because the cache-breaker data wasn't getting stored correctly. Additionally, when the cache-breaker triggered, the old file data was being leaked.
* Attribute file cache refactorRussell Belfer2014-04-172-16/+16
| | | | | | | 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.
* Fix core.excludesfile named .gitignorerb/fix-leading-slash-ignoresRussell Belfer2014-04-141-12/+9
| | | | | | | | | | | | | | | | | Ignore rules with slashes in them are matched using FNM_PATHNAME and use the path to the .gitignore file from the root of the repository along with the path fragment (including slashes) in the ignore file itself. Unfortunately, the relative path to the .gitignore file was being applied to the global core.excludesfile if that was also named ".gitignore". This fixes that with more precise matching and includes test for ignore rules with leading slashes (which were the primary example of this being broken in the real world). This also backports an improvement to the file context logic from the threadsafe-iterators branch where we don't rely on mutating the key of the attribute file name to generate the context path.
* More ** tests for pattern rulesRussell Belfer2014-04-061-4/+50
|
* Add support for ** matches in ignoresRussell Belfer2014-04-041-0/+13
| | | | | This is an experimental addition to add ** support to fnmatch pattern matching in libgit2. It needs more testing.
* index: rename an entry's id to 'id'Carlos Martín Nieto2014-01-251-1/+1
| | | | This was not converted when we converted the rest, so do it now.
* Remove converting user error to GIT_EUSERRussell Belfer2013-12-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behavior of callbacks so that the callback error code is not converted into GIT_EUSER and instead we propagate the return value through to the caller. Instead of using the giterr_capture and giterr_restore functions, we now rely on all functions to pass back the return value from a callback. To avoid having a return value with no error message, the user can call the public giterr_set_str or some such function to set an error message. There is a new helper 'giterr_set_callback' that functions can invoke after making a callback which ensures that some error message was set in case the callback did not set one. In places where the sign of the callback return value is meaningful (e.g. positive to skip, negative to abort), only the negative values are returned back to the caller, obviously, since the other values allow for continuing the loop. The hardest parts of this were in the checkout code where positive return values were overloaded as meaningful values for checkout. I fixed this by adding an output parameter to many of the internal checkout functions and removing the overload. This added some code, but it is probably a better implementation. There is some funkiness in the network code where user provided callbacks could be returning a positive or a negative value and we want to rely on that to cancel the loop. There are still a couple places where an user error might get turned into GIT_EUSER there, I think, though none exercised by the tests.
* Rename tests-clar to testsBen Straub2013-11-146-0/+1049