summaryrefslogtreecommitdiff
path: root/src/fnmatch.c
Commit message (Collapse)AuthorAgeFilesLines
* ignore: move star-star matching closer to it usecmn/ignore-starstarCarlos Martín Nieto2016-04-191-16/+11
| | | | | Instead of threading the state down to the larger loop, let's have the loop where we detect the double star so each of them are easier to read.
* ignore: fix directory limits when searching for star-starCarlos Martín Nieto2016-04-191-6/+24
| | | | | | | | | | | | In order to match the star-star, we disable the flag that's looking for a single path element, but that leads to searching for the pattern in the middle of elements in the input string. Mark when we're handing a star-star so we jump over the elements in our attempt to match the part of the pattern that comes after the star-star. While here, tighten up the check so we don't allow invalid rules through.
* git__tolower: a tolower() that isn't dumbEdward Thomson2015-05-291-5/+5
| | | | | | | | Some brain damaged tolower() implementations appear to want to take the locale into account, and this may require taking some insanely aggressive lock on the locale and slowing down what should be the most trivial of trivial calls for people who just want to downcase ASCII.
* Restore attributions for fnmatchMartin Woodward2014-05-191-0/+34
|
* Make ** pattern eat trailing slashrb/fix-starstar-againRussell Belfer2014-05-011-0/+2
| | | | This allows "foo/**/*.html" to match "foo/file.html"
* Fix fnmatch comment to be clearerrb/starstar-fnmatchRussell Belfer2014-04-061-1/+3
|
* Add support for ** matches in ignoresRussell Belfer2014-04-041-3/+8
| | | | | This is an experimental addition to add ** support to fnmatch pattern matching in libgit2. It needs more testing.
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Import DOS fix for fnmatchRussell Belfer2012-10-151-4/+16
| | | | | | Because fnmatch uses recursion, there were some input sequences that cause seriously degenerate behavior. This imports a fix that imposes a max recursion limiter to avoid the worst of it.
* Always use internal fnmatch, not systemRussell Belfer2012-10-151-0/+180
|
* fnmatch: Use native on Unix, emulate on Win32Vicent Marti2011-07-061-489/+0
|
* Add git.git's fnmatch, which is really GNU's and the git__fnmatch wrapperCarlos Martín Nieto2011-06-261-0/+489
If the strings match, git__fnmatch returns GIT_SUCCESS and GIT_ENOMATCH on failure to match. MSVC fixes: Added a test for _MSC_VER and (in that case) defined HAVE_STRING_H to 1 so it doesn't try to include <strings.h> which doesn't exist in the MSVC world. Moved the function declarations to use the modern inline ones so MSVC doesn't have a fit. Added casts everywhere so MSVC doesn't crap its pants. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>